Varendo

Drawer

Inline or modal detail according to an explicit mode; do not mix the two focus models.

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

One inline end-side report detail drawer that keeps surrounding context visible.

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<AeliqoDrawerElement>("aeliqo-drawer", root);
		element.heading = "Report details";
		element.mode = "inline";
		element.side = "end";
		element.open = true;
		element.textContent = "Inline detail content keeps the surrounding task visible.";
	}))(root);

Purpose

Shows secondary detail at a chosen edge, inline in the layout or as a modal overlay. The mode sets focus and dismissal behavior; closing emits a request, not an action.

When to use it

When to use a different component

Properties and defaults

Inline mode participates in layout; modal mode is chosen by the host when a separate focus boundary is needed.

Properties, ownership, and initial values
PropertyUse and ownershipDeclared typeInitial value
openControls whether the overlay or expandable surface is currently open.booleanfalse
headingProvides the visible overlay or feedback heading and its accessible label.string'Details'
modeSupplies mode to the component as application-owned input.AeliqoDrawerMode'inline'
sideChooses the edge from which the drawer opens.AeliqoDrawerSide'end'

Events

Events, payloads, timing, and application responsibilities
EventPayloadEmittedApplication responsibility
aeliqo-drawer-closeThe close reason supplied by the drawer.After Escape or a close control.Set open to false and restore focus to the opener.

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

Listen for aeliqo-drawer-close

TypeScript example
const element = document.querySelector('aeliqo-drawer');<p>element?.addEventListener('aeliqo-drawer-close', (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 detail surface adapts to inline or overlay mode and emits a close request.

Keyboard, focus, and accessibility

Keyboard behavior:

Exposed semantics:

Responsive behavior

Inline mode uses its host column; give it the full row when that column is too narrow. Choose modal mode only when a separate focus boundary is needed.

Style hooks

Generated TypeScript declaration

View generated declaration
export declare class AeliqoDrawerElement extends AeliqoFoundationElement {
    static readonly properties: {
        open: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        heading: {
            type: StringConstructor;
        };
        mode: {
            type: StringConstructor;
        };
        side: {
            type: StringConstructor;
        };
    };
    static readonly styles: import("lit").CSSResult[];
    open: boolean;
    heading: string;
    mode: AeliqoDrawerMode;
    side: AeliqoDrawerSide;
    private readonly overlayFocus;
    protected willUpdate(changed: Map<string, unknown>): void;
    protected updated(changed: Map<string, unknown>): void;
    private syncModalDialog;
    private showModalDialog;
    private closeModalDialog;
    private focusInlineTarget;
    private keydown;
    private close;
    protected render(): import("lit").TemplateResult<1>;
}

Version

This page documents the Varendo 0.6 component contract.