Varendo

Skeleton

Stable reserved geometry with reduced motion and a named loading state.

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

Three static loading lines representing report rows.

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<AeliqoSkeletonElement>("aeliqo-skeleton", root);
		element.label = "Loading report rows";
		element.lines = 3;
		element.variant = "text";
		element.animated = false;
	}))(root);

Purpose

Reserves a visible shape for content that is still loading. Line count and variant describe the expected geometry; the host replaces it with the real result.

When to use it

When to use a different component

Properties and defaults

Skeleton is a temporary visual placeholder; it must be replaced by an explicit ready, empty, or error result.

Properties, ownership, and initial values
PropertyUse and ownershipDeclared typeInitial value
labelProvides the visible label and accessible name for the component.string'Loading'
linesSupplies lines to the component as application-owned input.number3
variantSelects one of the documented visual variants without changing the component contract.AeliqoSkeletonVariant'text'
animatedEnables or disables animated as explicit host-controlled state.booleantrue

Events

States and failure handling

Relevant states:

Expected result: The loading placeholder communicates pending content without inventing data.

The text variant renders between one and twelve lines, clamping an out-of-range lines value; rectangular and circular variants render one shape. Reduced motion turns off the pulse animation. The skeleton carries a loading status, but it cannot tell whether a request later became empty, denied, or failed.

Keyboard, focus, and accessibility

Keyboard behavior:

Exposed semantics:

Responsive behavior

Match the width of the content it replaces without forcing horizontal scroll. Reduced-motion settings stop its animation.

Style hooks

Generated TypeScript declaration

View generated declaration
export declare class AeliqoSkeletonElement extends AeliqoFoundationElement {
    static readonly properties: {
        label: {
            type: StringConstructor;
        };
        lines: {
            type: NumberConstructor;
        };
        variant: {
            type: StringConstructor;
        };
        animated: {
            type: BooleanConstructor;
        };
    };
    static readonly styles: import("lit").CSSResult[];
    label: string;
    lines: number;
    variant: AeliqoSkeletonVariant;
    animated: boolean;
    protected render(): import("lit").TemplateResult<1>;
}

Version

This page documents the Varendo 0.6 component contract.