Varendo

EmptyState

Distinguish no records, no matches, forbidden data, loading and failure.

FamilyfeedbackLicenseApache-2.0
StandaloneAvailable

Use the web element directly without the semantic runtime.

Semantic bindingAvailable

A registered presentation adapter can bind this component to host-owned meaning and state.

Automatic adaptationNo standard recipe

The standard recipe resolver does not select this component automatically.

Import and live example

A no-matches result with a clear-filters action.

Interactive preview requires JavaScript.

View the complete example source
import {registerAeliqoElements} from "@varendo/web";
import {
  AeliqoAlertElement,
  AeliqoDialogElement,
  AeliqoDrawerElement,
  AeliqoEmptyStateElement,
  AeliqoPopoverElement,
  AeliqoProgressElement,
  AeliqoSkeletonElement,
  AeliqoToastElement,
  AeliqoTooltipElement,
} from "@varendo/web/feedback";



registerAeliqoElements();

const host = document.querySelector<HTMLElement>("#aeliqo-example") ?? (() => {
  const created = document.createElement("div");
  created.id = "aeliqo-example";
  (document.body ?? document.documentElement).append(created);
  return created;
})();

function createCatalogRoot(container: HTMLElement): HTMLElement {
  const root = document.createElement("div");
  root.dataset.catalogSourceRoot = "true";
  root.style.display = "grid";
  root.style.gap = "12px";
  container.append(root);
  return root;
}

function createCatalogElement<T extends HTMLElement>(tagName: string, container: HTMLElement): T {
  const element = document.createElement(tagName) as T;
  element.setAttribute("data-aeliqo-theme", "light");
  container.append(element);
  return element;
}

function appendSlottedText(root: HTMLElement, slot: string, textContent: string): void {
  const content = document.createElement("span");
  content.slot = slot;
  content.textContent = textContent;
  root.append(content);
}

const root = createCatalogRoot(host);
(((root) => {
		const element = createCatalogElement<AeliqoEmptyStateElement>("aeliqo-empty-state", root);
		element.kind = "no-matches";
		element.heading = "No matching reports";
		element.message = "Try a broader team or date filter.";
		element.actionLabel = "Clear filters";
	}))(root);

Purpose

Explains why a region has no content, with an explicit kind, heading, and message. An optional recovery button proposes a host action such as clearing filters.

When to use it

When to use a different component

Properties and defaults

The kind describes the honest empty condition; the action is a host request to change filters.

Properties, ownership, and initial values
PropertyUse and ownershipDeclared typeInitial value
kindSelects the semantic empty-state treatment; it does not change application behavior.AeliqoEmptyStateKind'no-records'
headingProvides the visible overlay or feedback heading and its accessible label.string'No records'
messageProvides the user-facing status, error, or recovery message.string'There is nothing to display.'
actionLabelProvides the visible text for the action control or section.string''

Events

Events, payloads, timing, and application responsibilities
EventPayloadEmittedApplication responsibility
aeliqo-empty-state-actionThe configured recovery action.After the user activates the empty-state action.Run the registered recovery path and update the surrounding data state.

Events cross the component boundary as user proposals. Validate their detail and current authority before applying a business effect.

Listen for aeliqo-empty-state-action

TypeScript example
const element = document.querySelector('aeliqo-empty-state');<p>element?.addEventListener('aeliqo-empty-state-action', (event) => {
  const proposal = (event as CustomEvent<unknown>).detail;
  // Validate the proposal, update host state, then assign controlled properties.
  applyProposal(proposal);
});

States and failure handling

Relevant states:

Expected result: The absence of matching data is explicit and the host can receive a typed recovery request.

Keyboard, focus, and accessibility

Keyboard behavior:

Exposed semantics:

Responsive behavior

Keep the recovery action visible when the page narrows. Let the explanation wrap within the host column.

Style hooks

Generated TypeScript declaration

View generated declaration
export declare class AeliqoEmptyStateElement extends AeliqoFoundationElement {
    static readonly properties: {
        kind: {
            type: StringConstructor;
        };
        heading: {
            type: StringConstructor;
        };
        message: {
            type: StringConstructor;
        };
        actionLabel: {
            type: StringConstructor;
            attribute: string;
        };
    };
    static readonly styles: import("lit").CSSResult[];
    kind: AeliqoEmptyStateKind;
    heading: string;
    message: string;
    actionLabel: string;
    private action;
    protected render(): import("lit").TemplateResult<1>;
}

Version

This page documents the Varendo 0.6 component contract.