Varendo

Alert

Persistent status/error with severity semantics and actionable recovery.

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 warning alert with an inspect action and optional dismissal.

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<AeliqoAlertElement>("aeliqo-alert", root);
		element.heading = "Review scope";
		element.message = "This page contains the first authorized result window.";
		element.tone = "warning";
		element.actionLabel = "Inspect";
		element.dismissible = true;
		element.open = true;
	}))(root);

Purpose

A persistent status or warning with a heading and message. Optional action and dismiss buttons emit separate proposals; tone supports the text, never replaces it.

When to use it

When to use a different component

Properties and defaults

The message remains visible; action and dismiss requests are handed to the host.

Properties, ownership, and initial values
PropertyUse and ownershipDeclared typeInitial value
openControls whether the overlay or expandable surface is currently open.booleantrue
messageProvides the user-facing status, error, or recovery message.string''
headingProvides the visible overlay or feedback heading and its accessible label.string''
toneSelects a semantic visual tone such as neutral, informative, success, warning, or danger.AeliqoFeedbackTone'info'
actionLabelProvides the visible text for the action control or section.string''
dismissibleShows a user dismissal control. The host still removes or updates the message after the event.booleanfalse

Events

Events, payloads, timing, and application responsibilities
EventPayloadEmittedApplication responsibility
aeliqo-alert-actionThe configured alert action identifier.After the user activates the alert action.Authorize and perform the action, then update or dismiss the alert.
aeliqo-alert-dismissDismissal context for the current alert.After the user requests dismissal.Remove or retain the alert according to application policy.

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

Listen for aeliqo-alert-action

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

Listen for aeliqo-alert-dismiss

TypeScript example
const element = document.querySelector('aeliqo-alert');</p>
<p>element?.addEventListener('aeliqo-alert-dismiss', (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 warning is exposed as an alert with separately typed action and dismissal requests.

Keyboard, focus, and accessibility

Keyboard behavior:

Exposed semantics:

Responsive behavior

Let the message and its actions wrap together. Keep dismissal available without separating it from the alert content.

Style hooks

Generated TypeScript declaration

View generated declaration
export declare class AeliqoAlertElement extends AeliqoFoundationElement {
    static readonly properties: {
        open: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        message: {
            type: StringConstructor;
        };
        heading: {
            type: StringConstructor;
        };
        tone: {
            type: StringConstructor;
        };
        actionLabel: {
            type: StringConstructor;
            attribute: string;
        };
        dismissible: {
            type: BooleanConstructor;
        };
    };
    static readonly styles: import("lit").CSSResult[];
    open: boolean;
    message: string;
    heading: string;
    tone: AeliqoFeedbackTone;
    actionLabel: string;
    dismissible: boolean;
    private dismiss;
    private action;
    protected render(): import("lit").TemplateResult<1>;
}

Version

This page documents the Varendo 0.6 component contract.