API Reference LanternUI v#0.8.2

Copy Markdown View Source

Modules

LanternUI — a dev-tool-native, open-source component system for Phoenix LiveView.

Native LiveView chart components — server-rendered SVG, minimal JS.

Pure geometry helpers for LanternUI charts: linear scaling, "nice" axis ticks, and SVG path building.

Class-string composition for LanternUI components.

Accordion — a WAI-ARIA APG accordion with the Fluxon 2.3.1 composition API.

Inline status alert. Mirrors Fluxon's alert/1 surface.

Semantic confirmation dialog composed on the shared modal runtime.

A Fluxon-compatible autocomplete for static or LiveView-backed search.

Compact initials or fallback-content avatar. No Fluxon equivalent.

Status badge / pill. Mirrors Fluxon's badge/1 surface.

Compact path breadcrumb — layout chrome + file/tree navigation.

Buttons — Fluxon-compatible API, shadcn-caliber styling.

A month-grid calendar primitive — the pane the date pickers compose.

A bounded panel: a titled surface that groups related content on a page.

Checkbox with label, description, and error states.

Native color picker paired with a hex readout. Mirrors Fluxon's color_input/1 and matches Form.input chrome (label, description, help, errors).

Command palette (⌘K dialog) — a modal combobox over a listbox of actions.

The admin data table — one Flop-driven table to replace the per-app admin_table copies. API deliberately mirrors the enventory/skusync baseline so swaps are mechanical.

Date/time pickers — Fluxon-compatible API composed from LanternUI primitives.

A segmented, directly-editable date/time field — the trigger primitive the date pickers compose (HeroUI-style: 2 / 3 / 2026, 8:45 AM).

Label/value pairs for a record's detail view — the <dl> every show page hand-rolls.

Dropdown menu on the shared overlay runtime (anchored placement, focus return, Escape/outside dismissal, arrow-key item navigation).

Quiet empty/zero state for tables, lists, and panels (a lantern-ui extension — Fluxon has no equivalent).

Form chrome — label, error, and a Fluxon-compatible input.

Tinted full-width group header: chevron · glyph · name · count · trailing action (the +).

A small, curated inline-SVG icon set (Heroicons outline paths, MIT).

Deprecated alias of LanternUI.Components.Button.button/1 with label on an icon-* size. Removed in 0.9.0.

Sticky right-rail inspector: optional section headings and a dense description_list.

App shell — a full-width top bar (brand + inline context + actions) over a fixed, collapsible left sidebar and a main content column. Breadcrumb chrome is a first-class layout region (goprint-style sticky trail under the appbar), not a per-app one-off.

Dense issue/inbox row: leading glyph · muted mono id · truncating title · meta · trailing. ~36px tall, hairline separators, hover tint.

Inline loading indicator — ring spinner or staggered dots. Mirrors Fluxon's loading/1 (server-render + CSS only, no JS).

Log view: monospace lines with a timestamp gutter and per-line severity. No Fluxon equivalent. Pure presentational server render; no JS hook.

Menu button and menubar — no Fluxon equivalent. Clean-room implementations of the WAI-ARIA APG menu-button and menubar patterns.

Chat message rows with optional avatar, metadata, and footer. No Fluxon equivalent.

Accessible, follow-aware transcript viewport for chat messages. No Fluxon equivalent.

Meter — a scalar measurement within a known range (role="meter", WAI-ARIA APG Meter pattern). Distinct from progress, which conveys task completion. Pure server-render + CSS; no Fluxon equivalent.

Modal dialog on the shared overlay runtime (focus trap, Escape/outside dismissal, prefers-reduced-motion-aware fade).

Vertical nav list — heading + links. Mirrors Fluxon's navlist / navheading / navlink surface (server-render only, no JS).

Pager + page-size control for paginated collections (a lantern-ui extension; Fluxon has no pagination component — this replaces flop_phoenix's pager).

Click-triggered floating panel holding arbitrary content.

Progress bar or completion ring. Pure server-render + CSS.

Deprecated alias of LanternUI.Components.Progress.progress/1 with shape="ring". Removed in 0.9.0.

Radio group for exclusive single selection. Mirrors Fluxon's radio_group/1 as radio/1 so templates call <.radio>.

Resource list: a simple index of resources (projects, apps, databases, buckets). No Fluxon equivalent. Pure presentational server render; no JS hook.

ScrollArea — themed scrollbar wrapper around native overflow scrolling. No Fluxon equivalent.

Deprecated alias of LanternUI.Components.Tabs.tabs_list/1 with variant="segmented". Removed in 0.9.0.

Select — mirrors Fluxon's select/1 surface: a FormField-aware select with a rich listbox path and a native fallback.

Visual divider — horizontal, vertical, or labeled. Mirrors Fluxon's separator/1.

Slide-over panel (drawer) that enters from a screen edge. Mirrors Fluxon's sheet/1, and shares the dialog open/close runtime with modal/1, so it's driven by LanternUI.open_dialog/1 / close_dialog/1.

Collapsible right-hand panel plus a toggle that remembers open/closed in localStorage.

Decorative, CSS-only placeholder for content that is still loading.

Slider — a single-thumb range input built on the WAI-ARIA APG slider pattern. No Fluxon equivalent; the form surface (field/name/value, label stack, errors) mirrors LanternUI's other form controls.

Compact summary metrics extracted from the data table overview.

Status circles, priority signal bars, run-pipeline, sync, and source glyphs for dense lists.

Toggle switch for binary settings. Mirrors Fluxon's switch/1 surface.

Presentational table family — the styled substrate data_table composes. Mirrors Fluxon's table/table_head/table_body/table_row surface.

Tabs — segmented tab list + panels. Mirrors Fluxon's tabs/tabs_list/ tabs_panel surface, server-driven: the active tab is an assign, tabs emit phx-click (or patch/navigate) and panels render with active.

Multi-line text input. Mirrors Fluxon's textarea/1 and matches Form.input chrome (label, description, help, errors).

Runtime theming — persisted --lantern-* token overrides.

Timeline: a vertical sequence of events with a marker rail. No Fluxon equivalent. Pure presentational server render; no JS hook.

Toast notification stack. Render once in a LiveView layout and push messages with LanternUI.send_toast/4.

Tooltip - mirrors Fluxon's tooltip/1 API with a small LiveView hook for hover/focus timing and viewport-aware placement.

Waterfall: horizontal spans laid out on ONE shared time axis, with a ruler. No Fluxon equivalent. Pure presentational server render; no JS hook.

Scan .ex / .exs / .heex for arbitrary Tailwind pixel values, hardcoded palette colors, and page-local greys. Used by mix lantern.lint.

Mix Tasks

Scan .ex / .exs / .heex for values that bypass lantern's compact type and grey scale. See docs/scale.md.