Varendo

IconButton

Named compact action with minimum target area; icon alone is never its accessible name.

FamilyfoundationLicenseApache-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 compact action with an accessible label and an icon slot.

Interactive preview requires JavaScript.

View the complete example source
import {registerAeliqoElements} from "@varendo/web";
import {
  AeliqoAvatarElement,
  AeliqoBadgeElement,
  AeliqoButtonElement,
  AeliqoGridElement,
  AeliqoHeadingElement,
  AeliqoIconButtonElement,
  AeliqoLinkElement,
  AeliqoScrollAreaElement,
  AeliqoSeparatorElement,
  AeliqoSplitPaneElement,
  AeliqoStackElement,
  AeliqoSurfaceElement,
  AeliqoTextElement,
} from "@varendo/web/foundation";



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<AeliqoIconButtonElement>("aeliqo-icon-button", root);
		element.label = "Open details";
		appendSlottedText(element, "icon", "⋯");
	}))(root);

Purpose

A compact icon button with a native target and a text name from label. Your app owns the emitted action and its pending state.

When to use it

When to use a different component

Properties and defaults

The label is required for the icon-only affordance; the host owns the action.

Properties, ownership, and initial values
PropertyUse and ownershipDeclared typeInitial value
disabledPrevents user interaction while keeping the control and its current value visible.booleanfalse
pendingMarks an action as in progress and prevents repeated activation until the host clears it.booleanfalse
typeSupplies type to the component as application-owned input.AeliqoActionType'button'
nameProvides the stable form or action name used by the host to identify this control.string''
valueControls the current value. Apply accepted user proposals back to this property.string''
labelProvides the visible label and accessible name for the component.string'Action'
sizeSelects the component size from its bounded visual variants.AeliqoIconButtonSize'medium'

Events

Events, payloads, timing, and application responsibilities
EventPayloadEmittedApplication responsibility
aeliqo-action{source, action, type}After a user activates the button or link.Authorize the action, perform the effect, and update pending or navigation state.

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

Listen for aeliqo-action

TypeScript example
const element = document.querySelector('aeliqo-icon-button');<p>element?.addEventListener('aeliqo-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 icon action remains keyboard reachable and emits the typed action proposal.

Keyboard, focus, and accessibility

Keyboard behavior:

Exposed semantics:

Responsive behavior

The icon target keeps its minimum hit area. Separate adjacent actions so their targets and focus outlines remain distinct.

Style hooks

Generated TypeScript declaration

View generated declaration
export declare class AeliqoIconButtonElement extends AeliqoActionElement {
    static readonly properties: {
        disabled: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        pending: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        type: {
            type: StringConstructor;
        };
        name: {
            type: StringConstructor;
            reflect: boolean;
        };
        value: {
            type: StringConstructor;
        };
        label: {
            type: StringConstructor;
        };
        size: {
            type: StringConstructor;
        };
    };
    label: string;
    size: AeliqoIconButtonSize;
    type: AeliqoActionType;
    protected render(): import("lit").TemplateResult<1>;
    static readonly styles: import("lit").CSSResult[];
}

Version

This page documents the Varendo 0.6 component contract.