API Reference Skua v#0.1.0

Copy Markdown View Source

Modules

Skua — headless-first, token-driven UI components for Phoenix LiveView.

A date input — a hidden ISO <input> that carries the value plus a trigger that opens a keyboard-navigable calendar (W3C APG date-grid pattern).

Display & feedback components — badge, dot, card, header, list, empty state, spinner, alert, accordion, breadcrumb, avatar, progress, skeleton.

Skua form components — button, label, error, field wrapper, input, textarea, toggle (checkbox / radio / switch), OTP, chip toggle, segmented control and slider (single + dual-handle range).

A dropdown menu — a trigger button that opens a top-layer menu of actions.

Top-layer overlay components — popover, dialog and drawer.

An international phone field — country picker + national number input that writes a canonical E.164 value (e.g. "+15555550100") into a hidden input for phx-change/phx-submit.

A styled, accessible <select> — single or multi, text or badge display, optionally searchable and creatable.

A token-styled, slot-driven table and a pagination control.

A tabs component — an ARIA tablist with client-side panel switching (no server round-trip), full keyboard support (Left/Right/Up/Down/Home/End), and roving tabindex. Token-styled and morphdom-safe.

A dark/light theme toggle.

Toasts — two complementary mechanisms

A tooltip — a small top-layer label shown on hover/focus of its trigger.

Normalizes a Phoenix.HTML.FormField (or raw name/value) into the attributes every Skua form component needs: a sanitized DOM id, the form name, the current value, and the list of errors to display.

Self-contained phone harness — country data, country/dial-code helpers, E.164 normalization, display formatting, and an Ecto changeset validator.

The country dataset Skua's phone field ships with — {name, iso2, dial} tuples for 230 countries and territories. Self-contained (no third-party dependency); ported from the aif-core dogfooding app so existing apps get the identical list.

Mix Tasks

Installs Skua into the current Phoenix project