Modules
Phoenix LiveView components with the Ledger UI design.
Boilerplate for a Ledger UI component module.
Registry of every component module of Ledger UI.
A list of sections that open under their titles (<.accordion> with <.accordion_item>).
The actions of one item (a table row, a card), opened by a "⋯" button, and action_button/1,
the direct button for an item with a single action.
The assistant ("Assistente (IA)"): the conversation, its messages, the proposals the user approves, the queries the assistant shows it made, the field to ask, the list of conversations and the starting suggestions. The assistant proposes and the user approves; nothing changes without a confirmation.
Persistent inline notice with colour, variant, shape, accent stripe, actions and a close button.
The application shell: the page frame, the main sidebar (the icon rail), the sidebar panel with its collapsible groups, the minimized panel, the sideblock, the horizontal navigation, the header, the right sidebar, the framed menu, the page header and the mode toggles.
Ring of light that runs along the border of any element while something works in the background.
The sign in and sign up screen in two halves, as the canvas draws it: on the left a centered column (the
brand mark, the title and subtitle, the :providers buttons and the divider, the form and a line under
it) and, on the right, either a picture filling its half with a testimonial over its lower part or the
:aside panel (tray background, content centered: a badge, a headline, a KPI card).
A text input with a list of suggestions under it. The person types, the list narrows (or the
server searches) and choosing a suggestion sets the field. Behaviour lives in the
LedgerUI.Autocomplete hook (priv/static/ledger_ui/hooks/autocomplete.js).
Avatars: an image or initials in a circle, a square, a squircle or any mask shape, with a status dot, a gradient ring, and stacked in groups.
Badges: filled, glowing, soft, outlined or bare text, with a dot, an icon or a remove button.
The trail of pages above the current one; the last :item is the current page.
The bar of bulk actions for a table with selection: how many are selected, optional fields,
buttons for the actions and a close that clears the selection. It shows only while count is
above zero.
Buttons: button/1 (filled, outlined, soft, ghost, glass, in every theme colour),
button_group/1 (segmented joins), icon_button/1 (square icon-only buttons, the top bar
buttons and the round "go" button) and insight_button/1 (the top bar AI insights pill).
A calendar for dates that matter (due dates, appointments, deadlines): a month grid or a week
grid of hours with colored event chips, month/week switching and keyboard navigation; plus
due_calendar/1, the agenda of due items by day.
The panel: surfaces (variant), colour (color, gradient), optional :title and composable
parts (header, body, footer).
The "card" table: one row per record in a rounded tray (lu-card), with an optional heading, a
footer line and sub-lines. For long lists (orders, invoices, clients).
Carousels without Swiper: slides on a track, and the LedgerUI.Carousel hook for arrows,
pagination, autoplay, keyboard, swipe and effects.
Status card of a cash register shift: an icon in the colour of the state, a title and a line, the time the register has been open (ticking in the browser) and a balance, a difference or an action.
Charts drawn by the package itself, as SVG with the lu-* look (axis labels, grid lines, legend,
tooltips, light and dark).
checkbox/1 (the lu-check box with label and description) and checkbox_group/1 (one
checkbox per option of a list field).
The chip (lu-chip): a small tag for a quick filter, an applied filter or a selected person.
Copy to clipboard: clipboard/1, a button that copies a text, and clipboard_input/1, a
field with a copy button joined to it.
Code, terminal output, logs and diffs in a dark card: an optional header with a title and a
copy button, line numbers, wrapping, added, removed and highlighted lines, and a small size for
tool output inside a LedgerUI.Components.Trace.trace/1.
A section that opens and closes under its trigger (<.collapse>) and a text clamped to a few
lines with a "show more" link (<.collapse_text>).
A color picker that outputs hex text: a saturation/brightness area to drag, a hue slider, an optional opacity slider, a hex field and a row of preset swatches.
A dialog opened with Ctrl K (or LedgerUI.open/1) where the person types, narrows the results
by scope and jumps to a page or runs an action from the keyboard (<.command_palette>).
The notice of a lost connection, as a toast: while the LiveView socket is down the toaster shows
a loading toast with the ring of light (aura), and removes it when the socket is back.
Page containers: container_fixed/1 centers its content up to the xl breakpoint (1280px),
container_fluid/1 fills the width. Both keep a 24px gutter.
A menu that opens under the pointer on a right click.
The canvas cover: a wide band in the accent gradient (or a quiet surface) that heads a profile or a page, with a title on it, or a record's avatar overlapping its lower edge.
A table with a search box, sortable headers, a pagination footer and row selection, in the two
looks of Ledger UI: advanced (title bar, the table as a card, summary and pager underneath)
and grid (search at the right, the gridjs table, summary and pager).
Date picker: one date, several dates or a range, with limits, disabled days, a custom text format and presets. The calendar pops under the input or stays inline.
A date and a time chosen in one panel: a calendar with a list of times beside it or, for a range, two months side by side with a start and an end time.
Label and value pairs in a grid, as the canvas lu-dl2: the label small and faint, the value
in the ink colour. For the short data of a detail (an order, a client).
A 1px separator in the line colour, horizontal or vertical, with optional centred or
left-aligned text.
Side panel (<.drawer>) and its sheet parts (<.sheet_header>, <.sheet_body>, <.sheet_footer>).
Dropdown menu: a button (or any trigger) that opens a floating menu of links and actions.
Ledger UI's transactional e-mail: one layout for the e-mails a system sends (a sign-in code, a reset link, an order update): the logo, a card with an icon badge, an eyebrow, a title, text, a block of code, facts or steps, a main button with its address spelled out, a note and a footer. 520px wide.
Empty state: what the area is, why it is empty and the one next step.
The canvas's error screens: the whole page an ErrorHTML renders (error_page/1), the error
inside the app (error_state/1) and the list of links under the actions (error_links/1).
Floating action buttons: fab/1, one button (the canvas's solid ink button, or the retracting
pill) and fab_dial/1, a speed-dial that opens a column of actions.
A filter button that opens a menu of filters: one row per group that opens a second panel to
its side with the group's options as checkboxes (or radios), plus flat sections (a sort order)
in the same menu. Behaviour lives in the LedgerUI.FilterMenu hook
(priv/static/ledger_ui/hooks/filter_menu.js): opening, submenus, keyboard (arrows, Enter,
Esc, ArrowRight into a submenu) and staging never leave the browser.
Workflow editor: steps on a dotted board joined by connections that carry the condition of each branch, a toolbar at the bottom and the configuration panel of a step on the right.
The pieces Ledger UI's forms are made of: a caption (label/1), a help line (help_text/1),
an error line (error/1) and the field/1 wrapper that puts them around any control.
A group of fields under a small title, laid out in a grid.
Text with a living gradient: the colors drift across the letters (lu-glowtx).
The hero card: the welcome or the insight at the top of a page. The text on the left (an eyebrow in mono caps with an optional icon, the title, the description, a goal meter or a list of steps, and the actions) and a landscape on the right that fades into the card.
Server-side SVG icons (Hugeicons Stroke Rounded), no JavaScript needed.
Light illustrations for empty states and result screens, drawn with the theme tokens (or inline SVG), so the package needs no static images.
An image field: the picture (an avatar, a logo) in a round or rounded frame, with an edit overlay and a small button to remove or revert it.
Single-line text field: outlined, filled or plain, rounded or pill, three sizes, icon,
prefix and suffix, states, masks.
Joins inputs, addons, selects and buttons into one row with shared borders.
Kanban board: a row of tinted columns holding cards that are dragged between them.
Indicator card: a big tabular figure, its unit in subtle and a coloured delta in the footer.
The marketing-site top bar: the logo on the left, the links in the center (one may open a mega menu), Entrar and the primary button on the right.
The Ledger UI mark. By default the chart glyph of the design canvas (an axis with a rising
line) on a rounded tile: tone="accent" is a teal tile, tone="mono" the inverse tile.
mark="hexagon" draws the README mark instead: a drop inside a hexagon (the ring follows the
page ink, the drop takes the theme accent, or silver with tone="mono").
Crops its content to one of nine mask shapes: squircle, reuleaux-triangle, diamond,
hexagon, hexagon-2, octagon, star, star-2 and heart.
Menu lists: a vertical list of links with one active entry (lu-ml), plus menu_item and
menu_row.
The canvas's mini card: a small card for a shortcut (an icon box over a bold label) or for a short figure (a faint label over a mono value).
Modal dialog for short tasks and confirmations (<.modal>).
The app top bar: a container (navbar/1) and small pieces to put in it. The right side keeps the
same vocabulary (search, notifications, theme, language and the user); the variants change what
goes on the left and the visual weight.
A bell with a count when something is unread and, under it, a panel with the notifications
(<.notification_center>).
A numeric field for money and quantities that shows the number the way the person's locale
writes it (1.234,56 in pt-BR, 1,234.56 in en) and submits the plain machine value
(1234.56).
A one-time code made of single-character boxes.
Pagination: the canvas pager (lu-pg2, shape canvas, rounded or pill) or the classic
bar of buttons (lu-pages, shape="classic"), in three sizes.
Swatches of the kit palette: a warm-neutral base with a teal brand scale, status signals and
chart series. Colours are always read from the tokens (var(--teal-500)), so the swatches
follow the theme.
A password field with the eye button that shows what was typed.
A phone number field with a country picker: a button at the left with the ISO code and the
calling code (BR +55), and the number input. The number is written in the national format of
the country as it is typed ((11) 91234-5678); what the form submits is the E.164 number
(+5511912345678).
Country data and number formatting for LedgerUI.Components.PhoneInput.
A quick filter of chips where the chosen ones take the accent: one choice by default, several
with multiple.
Multiple (or single) choice drawn as pills inside the field, with a searchable list
under it. It is the LedgerUI.Components.Select listbox (multiple, search="panel")
and shares its hook, LedgerUI.Select (priv/static/ledger_ui/hooks/select.js).
The pixel card: a card to choose from (a model, a module, an integration) that, on hover or keyboard focus, lights up a matrix of pixels in its top right corner, in the card's colour.
A card with an arrow next to its trigger (<.popover>), for more than a tooltip holds.
Progress bar (progress/1) and the stacked bar of parts of a total (progress_stack/1).
Single choice among visible options: radio_group/1, in six forms.
Range slider: a rounded track with a round thumb, one value or a range of two.
A star rating: read-only, with a fractional value and the count of reviews, or interactive, as
a group of native radios; and rating_distribution/1, the summary with the average and a bar
per grade.
A box that scrolls with a thin scrollbar (6px, transparent track). For long menus, lists in a
card, the body of a panel. The height comes from class or an inline style.
A list of links to the sections of the page that marks the section in view.
A segmented control: a row of toggle buttons where exactly one is chosen.
Select: the styled native <select> (native) and a searchable listbox driven by the
LedgerUI.Select hook (priv/static/ledger_ui/hooks/select.js).
Option shapes and form plumbing shared by select, autocomplete, pillbox,
tags_input, pill_select, segmented, checkbox_group and radio_group.
The framed shell of the app with the side menu of sidebar/1: the menu on the grey frame and the
page beside it. It is fed by one list of items, so changing sidebar changes the menu and not the
items.
The side menu of the shell, in four formats that read the same data
A signature field: sign with a finger, a pen or the mouse (pointer events), or type a name that is set in a handwriting font. The signature leaves as SVG text.
Loading placeholder that mirrors the final layout. The size comes from class.
The canvas's sparkline (lu-spark): a line with a soft fill under it, drawn on the server from a
list of numbers (the highest at the top), so it renders without JavaScript.
Short loading indicator: five designs, five sizes and the system colours.
Short figures side by side: the label over the number, a divider between them, inside a card, a sunken strip or a bare row.
A framed card for processes in steps (a build, a deploy, issuing an invoice, an import).
A block that sticks to the top of the page and takes classes while the page is scrolled: a header that gets an edge, a bar that gets a shadow.
A switch (lu-sw): a checkbox drawn as a track and thumb, for an effect that is immediate.
Ledger UI's tables: basic, bordered, hoverable, zebra, the grid and the lean data looks, with
:col slots the way Phoenix's generated CoreComponents.table/1 takes them.
Tabs: line, boxed, pill, text, segmented and nav (the lu-tb family), plus the
classic underline tabs with count badges (lu-tabs), horizontal or vertical.
Tags: clickable badges that represent an attribute, a filter or an action.
A tag input: what is typed becomes a tag on Enter, Tab or a comma (pasting a comma separated
list creates several); tags are removed with Backspace or their remove button. Behaviour lives
in the LedgerUI.TagsInput hook (priv/static/ledger_ui/hooks/tags_input.js).
Rich text editor on a plain contenteditable (bold, italic, underline, strike, quote, code,
headings, lists, sub/superscript, indent, text direction, size, font, colors, alignment, links
and clean), plus its compact variant="comment" form for threads.
Multi-line text field: outlined, filled or plain, fixed or resizable, with a live
character counter, autogrow, {{token}} highlighting and optional header/footer bars.
Lets the user choose a named palette: a menu in the top bar or a grid of previews on a settings page. Each option previews its own colors.
The light / dark / system choice.
Time picker: an input with a clock icon that opens a scrollable list of times
(variant="input"), or a list of fixed slots (variant="list").
Events down a line, each marked by a filled, outlined, icon or avatar point.
A timer that ticks in the browser: a ring with the time in the middle (a shift, a countdown, any stretch of time) and a small pill of it for a top bar.
Notifications: the toaster, toasts pushed by the server, and the cards drawn in the page.
A tool call an agent makes (running a command, reading a file), from input to output, as a line
of a LedgerUI.Components.Trace.trace/1: a plain line while it runs, a step that opens on its
output once it has one, red when it fails. A call that waits for the user is a
tool_approval/1 card with Deny and Approve.
A short hint around a trigger (<.tooltip>).
What an agent did, one line per step: an icon, a title that truncates, an optional description (a count, a duration, a diff) and a status. A step can open to show its output, link somewhere, or group the steps under it.
A tree view: a hierarchical list whose branches expand and collapse.
Ledger UI's type scale: headings, running text, text links, inline code and keyboard keys.
File uploads built on LiveView uploads: the drop panel with each file's progress, errors and cancel button, and the styled "Choose File" button.
The views of a collection (List, Board, Table...) as a segmented control (lu-seg), with an
optional "+ View" menu to add one and a menu of saved views.
The installed components as data: modules, docs, attrs and slots.
Small helpers shared by all components.
The icons an app vendored with mix ledger_ui.icons, loaded for <.icon>.
Reads Hugeicons Stroke Rounded SVGs and converts them to the kit's stroke format.
Builds the Claude Code skill that teaches an agent to write Ledger UI markup.
Commands for a <.timer> (see LedgerUI.Components.Timer).
Mix Tasks
A Mix compiler that regenerates .claude/skills/ledger-ui/ when the installed ledger_ui is not
the version the skill was written for, so mix deps.update ledger_ui and a compile leave the
skill exact. Opt in, in the host app's mix.exs
Writes .claude/skills/ledger-ui/: a short SKILL.md index and one reference per component,
generated from the installed package's attrs, slots and docs.
Vendors the Hugeicons Stroke Rounded icons the app
uses into a folder (priv/hugeicons by default) that <.icon> reads. No extra dependency: it
downloads from the free set in GitHub (hugeicons/hugeicons, MIT) with :httpc and verified TLS.
Writes the Claude Code skill (mix ledger_ui.gen.skill), points AGENTS.md and CLAUDE.md
(those that exist) at it, and prints the lines to add by hand to the CSS, the JS, the web module,
mix.exs (the :ledger_ui_skill compiler that refreshes the skill on every package update)
and the config (the vendored icons). Running it twice changes nothing the second time.