Components
This page is made from the #[component] functions in
aurora-leptos/src/
and their doc comments. For the types that the props take (ApiError,
DagNode, LogLine, …), see the
API reference on docs.rs. To see each
component on a page, run the gallery.
“Default” is the value of a prop that you do not give. “Optional” means the
prop is empty when you do not give it (an empty string, false, None).
A prop marked “required” must be given.
A prop of type Signal<T> takes a value, a signal or a closure. A prop of
type Option<Callback<T>> takes a Callback::new(...).
Stylesheet
Section titled “Stylesheet”use aurora_leptos::AuroraStyles;
AuroraStyles
Section titled “AuroraStyles”Puts the full Aurora stylesheet in an inline <style>. hyper=true adds the opt-in hyper theme. A linked stylesheet has no first-paint flash: see Load the stylesheet as a file.
| Prop | Type | Default |
|---|---|---|
hyper |
bool |
optional |
use aurora_leptos::theme::ThemeToggle;
ThemeToggle
Section titled “ThemeToggle”A Light / Dark / System control. Put it in a top bar.
The choice changes the page at once and is stored in the browser. Each button tells assistive technology whether it is pressed.
hyper=true adds a Hyper button (Light / Dark / Hyper / System). Load
HYPER_CSS too, or Hyper shows the system theme.
| Prop | Type | Default |
|---|---|---|
hyper |
bool |
optional |
Primitives
Section titled “Primitives”use aurora_leptos::components::*;
A horizontal flex row.
justify:"between"or"end"(default: the start).align: the cross axis."center"(default),"start","end"(the bottom edge: a labelled field and a button line up on the control),"baseline"or"stretch".top=trueis the same asalign="start".wrap,gap("xs","sm"; defaultmd).
| Prop | Type | Default |
|---|---|---|
justify |
String |
optional |
top |
bool |
optional |
align |
String |
optional |
wrap |
bool |
optional |
gap |
String |
optional |
children |
Children |
required |
A vertical flex column. gap: "xs" or "sm" (default md). center centres the children.
| Prop | Type | Default |
|---|---|---|
center |
bool |
optional |
gap |
String |
optional |
children |
Children |
required |
A paragraph of text. size: "xs", "sm" or "lg". dimmed, bright, bold and mono change its look.
| Prop | Type | Default |
|---|---|---|
size |
String |
optional |
dimmed |
bool |
optional |
bright |
bool |
optional |
bold |
bool |
optional |
mono |
bool |
optional |
children |
Children |
required |
Button
Section titled “Button”A button.
variant:"filled"(default),"light","default"or"subtle"."primary"is the same as"filled".size:"xs","sm"(default) or"md".bad: the danger colour.disabled: abool, a signal or a closure (disabled=move || busy.get()).loading: while true, the button shows a spinner, is disabled and hasaria-busy="true". Withloading_label, that text replaces the children while it loads (“Saving…”).button_type: thetypeattribute ("submit"in a form). Not set by default, so a button in a<form>submits it, as before.href: draws a link (<a>) that looks like the button.title,aria_label: the tooltip and the accessible name (givearia_labelwhen the children are only an icon). AString, a signal or a closure, so they can change (AURORA-T-0013 item 13).stop_propagation: the click does not go on to a parent (a button in a clickable table row or card).
| Prop | Type | Default |
|---|---|---|
variant |
String |
"filled" |
size |
String |
"sm" |
bad |
bool |
optional |
disabled |
Signal<bool> |
optional |
loading |
Signal<bool> |
optional |
loading_label |
String |
optional |
button_type |
String |
optional |
href |
String |
optional |
title |
Signal<String> |
optional |
aria_label |
Signal<String> |
optional |
stop_propagation |
bool |
optional |
on_click |
Option<Callback<()>> |
optional |
children |
Children |
required |
TextInput
Section titled “TextInput”A one-line text field, bound to value.
label,placeholder,error(a red border and a message under it).errortakes aString, a&str, a signal or a closure, so the message can change while the field is shown.id: theidof the<input>, for a<label for=…>outside the component. Default: a unique id.aria_label: the accessible name when there is no visiblelabel.input_type: thetypeattribute,"text"by default ("email","url","search","date","password"…).disabled: abool, a signal or a closure.on_input: runs with the new text on each key press (aftervaluechanges).on_change: runs when the person leaves the field or presses Enter after a change.name,autocomplete,required,spellcheck: the HTML attributes (for forms and password managers).mono: the text in the mono font (ids, codes).description: a help line under the field, linked to it witharia-describedby. AString, a signal or a closure.described_by: more ids foraria-describedby(a help text elsewhere).requiredalso marks the label with*.autofocus: focus the field when it is mounted.maxlength,min,max,step: the HTML attributes.
| Prop | Type | Default |
|---|---|---|
label |
String |
optional |
placeholder |
String |
optional |
value |
RwSignal<String> |
required |
error |
Signal<String> |
optional |
input_type |
String |
optional |
disabled |
Signal<bool> |
optional |
on_input |
Option<Callback<String>> |
optional |
on_change |
Option<Callback<String>> |
optional |
name |
String |
optional |
autocomplete |
String |
optional |
required |
bool |
optional |
spellcheck |
Option<bool> |
optional |
mono |
bool |
optional |
id |
String |
optional |
aria_label |
String |
optional |
description |
Signal<String> |
optional |
described_by |
String |
optional |
autofocus |
bool |
optional |
maxlength |
Option<u32> |
optional |
min |
String |
optional |
max |
String |
optional |
step |
String |
optional |
Select
Section titled “Select”A native select, bound to value.
options: the choices, where the value and the text are the same.option_pairs:(value, label)choices, where the text differs from the value (("42", "COLLIERY-T-42 · Fix the pager")). Shown afteroptions.placeholder: a first choice with the value""(such as “Choose a board” or “(none)”).aria_label: the accessible name when there is no visiblelabel. (attr:aria-labelgoes on the wrapper<div>, not on the<select>.)id: theidof the<select>, for a<label for=…>outside the component. Default: a unique id.disabled,on_change(runs with the new value),name,required,error(aString, a&str, a signal or a closure).description,described_by,autofocus: as onTextInput.
options and option_pairs take a Vec, a signal or a closure: when
they change, the select shows the new choices (AURORA-T-0013 item 11).
When value matches no option and there is no placeholder, the select
shows the first option, as a native select does. value itself is not
changed.
| Prop | Type | Default |
|---|---|---|
label |
String |
optional |
options |
Signal<Vec<String>> |
optional |
option_pairs |
Signal<Vec<(String, String)>> |
optional |
value |
RwSignal<String> |
required |
placeholder |
String |
optional |
disabled |
Signal<bool> |
optional |
on_change |
Option<Callback<String>> |
optional |
name |
String |
optional |
required |
bool |
optional |
error |
Signal<String> |
optional |
id |
String |
optional |
aria_label |
String |
optional |
description |
Signal<String> |
optional |
described_by |
String |
optional |
autofocus |
bool |
optional |
Tooltip
Section titled “Tooltip”A short text that shows over its trigger on hover and on keyboard focus.
label: the text. It is also the accessible description of the trigger (aria-describedbyon the first control inside).position:"top"(default),"bottom","left"or"right".focusable: the wrapper takes keyboard focus. Use it when the trigger is not a control (a pill, an icon, an inline SVG).
It shows after a short delay, and at once for keyboard focus. Escape
hides it. It is pure CSS, so a parent with overflow: hidden can cut it:
use position to keep it inside. For a plain hint on truncated text, a
title attribute is enough. Inside an SVG chart, use an SVG <title>.
| Prop | Type | Default |
|---|---|---|
label |
String |
required |
position |
String |
optional |
focusable |
bool |
optional |
children |
Children |
required |
A small tinted label. Give it a hue token (token::OK): the text is --x-fg on the --x-bg fill. Any other colour gets an 11% tint.
| Prop | Type | Default |
|---|---|---|
color |
String |
required |
children |
Children |
required |
StatusBadge
Section titled “StatusBadge”A status as a pill. The hue comes from status_color(status): running is ice, completed ok, failed bad, scheduled violet, pending and paused muted, cancelled gold, skipped skip. Any other text is muted. The case does not matter.
| Prop | Type | Default |
|---|---|---|
status |
String |
required |
A small round status dot in color. size is in px. glow adds a soft ring.
| Prop | Type | Default |
|---|---|---|
color |
String |
required |
size |
i32 |
8 |
glow |
bool |
optional |
A card surface with a title and an optional caption.
| Prop | Type | Default |
|---|---|---|
title |
String |
required |
caption |
String |
optional |
children |
Children |
required |
A filter chip: a toggle button.
label,count(shown when 0 or more),active,on_click.counttakes a number, a signal or a closure, so a live count updates (AURORA-T-0013 item 10).
It is a type="button" (it does not submit a form) with aria-pressed
from active, so a screen reader says whether the filter is on.
| Prop | Type | Default |
|---|---|---|
label |
String |
required |
count |
Signal<i32> |
Signal::stored(-1) |
active |
Signal<bool> |
required |
on_click |
Option<Callback<()>> |
optional |
Loading
Section titled “Loading”The “loading” state of a view: a spinner and a label.
| Prop | Type | Default |
|---|---|---|
label |
String |
"Loading…" |
An empty state: a message, and an optional next step.
message: what is empty (“No agents yet.”).hint(optional): the next step, in a smaller line under it (“Install an agent to see it here.”).href+link(optional): a link after the hint (“Read how”, the default text when onlyhrefis given).- children (optional): any next-step content (a button, a link) under the message and the hint.
| Prop | Type | Default |
|---|---|---|
message |
String |
required |
hint |
String |
optional |
href |
String |
optional |
link |
String |
optional |
children |
Option<Children> |
optional |
ErrorState
Section titled “ErrorState”The “error” state of a view. It classifies the ApiError (not authorised, not found, invalid, server, network) and shows a retry button when on_retry is given and the error can be retried.
| Prop | Type | Default |
|---|---|---|
error |
ApiError |
required |
on_retry |
Option<Callback<()>> |
optional |
Plain block / style carrier (Mantine Box).
| Prop | Type | Default |
|---|---|---|
children |
Children |
required |
Inline monospace <code> chip (Mantine Code).
| Prop | Type | Default |
|---|---|---|
children |
Children |
required |
Anchor
Section titled “Anchor”Accent text link (Mantine Anchor).
| Prop | Type | Default |
|---|---|---|
href |
String |
optional |
children |
Children |
required |
Divider
Section titled “Divider”Hairline rule (Mantine Divider).
No props.
Loader
Section titled “Loader”Standalone spinner (Mantine Loader).
size:"xs"(14px, for a line of text or a button),"sm"(20px) or"md"(32px, default).label(optional): the accessible name (“Loading runs”). With a label the spinner is arole="status"; with none it is hidden from screen readers, for a place that says it is busy another way.
| Prop | Type | Default |
|---|---|---|
size |
String |
optional |
label |
String |
optional |
Skeleton
Section titled “Skeleton”A grey placeholder in the shape of content that is loading.
width,height(CSS lengths): default100%and1em.lines: draw that many lines of text instead (the last one shorter).circle: a circle ofheight(an avatar).
It is hidden from screen readers: say “loading” another way (a
Loader with a label, or aria-busy on the region). The shimmer stops
when the OS asks for reduced motion.
| Prop | Type | Default |
|---|---|---|
width |
String |
optional |
height |
String |
optional |
lines |
usize |
optional |
circle |
bool |
optional |
Accordion
Section titled “Accordion”A group of Disclosures. By default one is open at a time: opening one
closes the others (the HTML name of <details>). multiple: any number
can be open.
| Prop | Type | Default |
|---|---|---|
multiple |
bool |
optional |
children |
Children |
required |
Disclosure
Section titled “Disclosure”A section that a person opens and closes: a native <details> with a
<summary>, so the keyboard and screen readers work with no script.
title: the always-visible line.open(optional): the open state, as a signal to read or set. With none, the section starts closed (ordefault_open) and keeps its own state.- Inside an
Accordion, opening one section closes the others.
| Prop | Type | Default |
|---|---|---|
title |
Signal<String> |
required |
open |
Option<RwSignal<bool>> |
optional |
default_open |
bool |
optional |
children |
Children |
required |
ActionIcon
Section titled “ActionIcon”Square icon-only button (Mantine ActionIcon).
aria_label: the accessible name. Give it: the children are an icon. With none, thetitleis the name.title: the tooltip.disabled: abool, a signal or a closure.button_type: thetypeattribute,"button"by default, so the button does not submit a form (AURORA-T-0013 item 12).
| Prop | Type | Default |
|---|---|---|
title |
Signal<String> |
optional |
aria_label |
Signal<String> |
optional |
disabled |
Signal<bool> |
optional |
button_type |
String |
"button" |
on_click |
Option<Callback<()>> |
optional |
children |
Children |
required |
Tinted callout (Mantine Alert). color is a hex/token value used for the
accent (defaults to the bad/red token). Powers ErrorState too.
| Prop | Type | Default |
|---|---|---|
title |
String |
optional |
color |
String |
optional |
children |
Children |
required |
Switch
Section titled “Switch”Toggle (Mantine Switch), controlled by a bool signal.
A real <button role="switch">, not a clickable <span> — which is what this
was (KAIROS-T-0198). The span version had a worse problem than the missing
label association that ticket was filed about: it was not a control at all. No
role, no state, not focusable, not keyboard-operable. A keyboard user could not
toggle it and a screen reader saw two pieces of decorative text.
A <button> gets focus, Enter and Space for free; role="switch" plus
aria-checked gives it the on/off state; and the label lives INSIDE the
button, which makes it the accessible name with no for/id needed. The
label is also then part of the click target, which it always looked like it
was.
disabled: abool, a signal or a closure.on_change: runs with the new state after a click.
| Prop | Type | Default |
|---|---|---|
checked |
RwSignal<bool> |
required |
label |
String |
optional |
disabled |
Signal<bool> |
optional |
on_change |
Option<Callback<bool>> |
optional |
SegmentedControl
Section titled “SegmentedControl”Segmented selector (Mantine SegmentedControl), bound to a string signal.
| Prop | Type | Default |
|---|---|---|
options |
Vec<String> |
required |
value |
RwSignal<String> |
required |
Textarea
Section titled “Textarea”Multi-line text field (Mantine Textarea), bound to value.
Same props as TextInput where they apply: disabled, on_input,
on_change, name, required, error (a string, a signal or a
closure), mono, id, aria_label, description, described_by,
autofocus, maxlength. rows (default 4).
| Prop | Type | Default |
|---|---|---|
label |
String |
optional |
placeholder |
String |
optional |
value |
RwSignal<String> |
required |
rows |
i32 |
4 |
error |
Signal<String> |
optional |
disabled |
Signal<bool> |
optional |
on_input |
Option<Callback<String>> |
optional |
on_change |
Option<Callback<String>> |
optional |
name |
String |
optional |
required |
bool |
optional |
mono |
bool |
optional |
id |
String |
optional |
aria_label |
String |
optional |
description |
Signal<String> |
optional |
described_by |
String |
optional |
autofocus |
bool |
optional |
maxlength |
Option<u32> |
optional |
NumberInput
Section titled “NumberInput”Numeric field with steppers (Mantine NumberInput), bound to an f64 signal.
step(default 1),minandmax(the steppers stop there).disabled,on_change(runs with the new number),name,required,error(a string, a signal or a closure),id(of the<input>),aria_label,description,described_by.
| Prop | Type | Default |
|---|---|---|
label |
String |
optional |
value |
RwSignal<f64> |
required |
step |
f64 |
1.0 |
min |
Option<f64> |
optional |
max |
Option<f64> |
optional |
error |
Signal<String> |
optional |
disabled |
Signal<bool> |
optional |
on_change |
Option<Callback<f64>> |
optional |
name |
String |
optional |
required |
bool |
optional |
id |
String |
optional |
aria_label |
String |
optional |
description |
Signal<String> |
optional |
described_by |
String |
optional |
PasswordInput
Section titled “PasswordInput”Password field with a reveal toggle (Mantine PasswordInput).
autocomplete:"current-password"on a sign-in form,"new-password"on a form that sets one, so a password manager helps.disabled,on_input,on_change,name,required,error(a string, a signal or a closure),id(of the<input>).aria_label(the accessible name when there is no visiblelabel),description,described_by,autofocus,maxlength: as onTextInput.
| Prop | Type | Default |
|---|---|---|
label |
String |
optional |
placeholder |
String |
optional |
value |
RwSignal<String> |
required |
error |
Signal<String> |
optional |
disabled |
Signal<bool> |
optional |
on_input |
Option<Callback<String>> |
optional |
on_change |
Option<Callback<String>> |
optional |
name |
String |
optional |
autocomplete |
String |
optional |
required |
bool |
optional |
id |
String |
optional |
aria_label |
String |
optional |
description |
Signal<String> |
optional |
described_by |
String |
optional |
autofocus |
bool |
optional |
maxlength |
Option<u32> |
optional |
SimpleGrid
Section titled “SimpleGrid”Equal-width responsive grid (Mantine SimpleGrid).
cols(default 2): the columns on a wide screen. Below 768px the grid has at most 2 columns, and below 480px one.fixed: keepcolsat every width (no collapse).
| Prop | Type | Default |
|---|---|---|
cols |
usize |
2 |
fixed |
bool |
optional |
children |
Children |
required |
12-column grid container (Mantine Grid). Pair with GridCol.
| Prop | Type | Default |
|---|---|---|
children |
Children |
required |
GridCol
Section titled “GridCol”A column within a Grid; span is out of 12.
| Prop | Type | Default |
|---|---|---|
span |
u8 |
12 |
children |
Children |
required |
Bulleted list (Mantine List). Use ListItem children.
| Prop | Type | Default |
|---|---|---|
children |
Children |
required |
ListItem
Section titled “ListItem”A List item.
| Prop | Type | Default |
|---|---|---|
children |
Children |
required |
A dropdown of actions off a trigger button. Put MenuItems in it (and
MenuLabel / MenuDivider).
label: the text of the default trigger (a default button with a chevron). Ortrigger: your own trigger content (a tenant name with a dot, an icon);trigger_classstyles it (default: a plain, full-width row). Givearia_labelwhen the trigger is only an icon.align:"start"(default) or"end"(the right edges line up, for a menu at the right of a bar).up: open above the trigger (a menu at the bottom of a sidebar).open(optional): hold the open state in your own signal.
Keyboard: Enter, Space or ArrowDown on the trigger opens it on the first item, ArrowUp on the last. ArrowUp / ArrowDown / Home / End move. Escape closes it and gives focus back to the trigger; Tab closes it. A click outside closes it. An item runs its action and closes the menu.
| Prop | Type | Default |
|---|---|---|
label |
String |
optional |
trigger |
Option<Children> |
optional |
trigger_class |
String |
optional |
aria_label |
String |
optional |
align |
String |
optional |
up |
bool |
optional |
open |
Option<RwSignal<bool>> |
optional |
children |
ChildrenFn |
required |
MenuItem
Section titled “MenuItem”An item in a Menu. It runs on_click (or opens href), closes the
menu, and gives focus back to the trigger.
disabled: abool, a signal or a closure; the item stays in the list but does nothing.danger: the danger colour (delete, remove).
| Prop | Type | Default |
|---|---|---|
on_click |
Option<Callback<()>> |
optional |
href |
String |
optional |
disabled |
Signal<bool> |
optional |
danger |
bool |
optional |
children |
Children |
required |
MenuLabel
Section titled “MenuLabel”A small heading for a group of items in a Menu.
| Prop | Type | Default |
|---|---|---|
children |
Children |
required |
MenuDivider
Section titled “MenuDivider”A line between groups of items in a Menu.
No props.
CopyButton
Section titled “CopyButton”A button that copies value to the clipboard and says so.
value: a string or a signal.icon: a square icon button (a copy icon that turns into a tick) in place of the text button.link:valueis a path (/items/K-1); it copies the absolute URL.label(default “Copy”): the text, or the accessible name of the icon button.copied_label(default “Copied”): the text after a copy.on_copy(optional): runs with the copied text.
The button is not there when the browser has no Clipboard API (a page on
plain HTTP), so there is never a button that does nothing. It confirms
only after the copy worked, and a screen reader hears “Copied” (an
aria-live region). A click does not go on to a clickable parent (a
table row).
| Prop | Type | Default |
|---|---|---|
value |
Signal<String> |
required |
icon |
bool |
optional |
link |
bool |
optional |
label |
String |
"Copy" |
copied_label |
String |
"Copied" |
on_copy |
Option<Callback<String>> |
optional |
A styled table (Mantine Table). Put <thead>, <tbody>, <tr>,
<th> and <td> in it, or the helpers: TableRow (a clickable row),
SortHeader (a header cell that sorts) and TableEmpty.
mono: tabular mono cells.fixed: a fixed layout (table-layout: fixed): the columns keep their widths, and long text is cut with “…”.widths: the column widths (vec!["22%".into(), "52px".into()]), as a<colgroup>. Two tables with the same widths line up.label: the accessible name of the table.min_width(optional, such as"640px"): the table does not get narrower than this; on a small screen it scrolls sideways in its own box, and the page does not.
The class cl-num on a th or td aligns a number to the right.
| Prop | Type | Default |
|---|---|---|
mono |
bool |
optional |
fixed |
bool |
optional |
widths |
Vec<String> |
optional |
label |
String |
optional |
min_width |
String |
optional |
children |
Children |
required |
TableRow
Section titled “TableRow”A table row that a person can click or open with the keyboard.
on_click: runs on a click on the row, and on Enter or Space when the row has focus. A click on a link, a button or a field inside the row goes to that control, not to the row.selected: shows the row as the selected one.label(optional): the accessible name of the row (for example the name of the item it opens).
With no on_click it is a plain <tr>.
| Prop | Type | Default |
|---|---|---|
on_click |
Option<Callback<()>> |
optional |
selected |
Signal<bool> |
optional |
label |
String |
optional |
children |
Children |
required |
SortHeader
Section titled “SortHeader”A header cell that sorts the table by key.
A click (or Enter / Space) sets sort: a new column starts ascending
(first_desc: descending, for times and counts), a second click flips
it. The cell has aria-sort. Sort the rows yourself from sort, for
example with rows.sort_by(|a, b| s.order(a.name.cmp(&b.name))).
align_right aligns the header of a number column; width sets the
width of the column.
| Prop | Type | Default |
|---|---|---|
label |
String |
required |
key |
String |
required |
sort |
RwSignal<crate::data::SortState> |
required |
first_desc |
bool |
optional |
align_right |
bool |
optional |
width |
String |
optional |
TableEmpty
Section titled “TableEmpty”A row that says the table has no rows. colspan is the number of
columns.
| Prop | Type | Default |
|---|---|---|
message |
String |
required |
colspan |
u32 |
1 |
use aurora_leptos::components::*;
AppShell
Section titled “AppShell”The app scaffold: a header across the top, a sidebar, and the main area.
header(optional): the top bar content (search, user menu, theme toggle).navbar(optional): the sidebar content, usually aSideNav. Leave it out for a top-bar-only app.brand(optional): the product mark and name. It shows in the header; with noheaderit shows at the top of the sidebar.contained: draw the shell as a bordered panel of fixed height (for docs and galleries). By default the shell fills the page.menu_label: the accessible name of the menu button (default “Menu”).nav_open(optional): the open state of the drawer, as your own signal. With none, the shell makes one. Either way it is in the context as anAppShellNav(use_app_shell).main_id,main_class(optional): theidand more classes of the<main>. With an id,<main>also hastabindex="-1", so a skip link can move focus to it.skip_link(optional): the text of a skip link (“Skip to content”). It is the first element of the shell, so it is the first Tab stop, and it shows only when it has focus. It goes tomain_id(default"main").breakpoint(optional): the width in px below which the sidebar is a drawer. DefaultAPPSHELL_BREAKPOINT(768).
Below the breakpoint the sidebar leaves the layout. A menu button in the header opens it as a drawer from the left, and the page under it does not scroll. Escape, a click on the scrim, or a click on a link closes it, and focus goes back to the menu button. When the window gets wider than the breakpoint, the drawer closes.
| Prop | Type | Default |
|---|---|---|
header |
Option<Children> |
optional |
navbar |
Option<Children> |
optional |
brand |
Option<ChildrenFn> |
optional |
contained |
bool |
optional |
menu_label |
String |
"Menu" |
nav_open |
Option<RwSignal<bool>> |
optional |
main_id |
String |
optional |
main_class |
String |
optional |
skip_link |
String |
optional |
breakpoint |
Option<u32> |
optional |
children |
Children |
required |
SideNav
Section titled “SideNav”The sidebar navigation: a <nav> landmark with groups of links and an
optional footer (scope switcher, user, sign-out) pinned to the bottom.
Put SideNavGroups and SideNavLinks inside. label is the name of
the landmark (default “Main”).
| Prop | Type | Default |
|---|---|---|
label |
String |
"Main" |
footer |
Option<Children> |
optional |
children |
Children |
required |
SideNavGroup
Section titled “SideNavGroup”A group of SideNavLinks with an optional label (“Orchestration”,
“System”). With a label, the group is an ARIA group named by it.
| Prop | Type | Default |
|---|---|---|
label |
String |
optional |
children |
Children |
required |
SideNavLink
Section titled “SideNavLink”One link in a SideNav: a plain <a href>, so it works with or without
a router (leptos_router handles clicks on plain anchors).
active: a bool, a signal or a closure (move || path.get() == "/runs"). The active link getsaria-current="page".count(optional): a badge after the label.count_colorsets its hue (a token, e.g.token::BAD); by default it is neutral.marker(optional): a small coloured square before the label (a token).icon(optional): an icon before the label.on_click(optional): runs on click (for apps that route with a signal).
| Prop | Type | Default |
|---|---|---|
href |
String |
required |
active |
Signal<bool> |
optional |
count |
MaybeProp<usize> |
optional |
count_color |
String |
optional |
marker |
String |
optional |
icon |
Option<Children> |
optional |
on_click |
Option<Callback<()>> |
optional |
children |
Children |
required |
PageHeader
Section titled “PageHeader”The page title block.
title: the page name, in an<h1>.sub(optional): a mono line under the title (an id, a path, a count).back_href+back_label(optional): a “← Executions” link above the title. The label defaults to “Back”.meta(optional): a line of pills or facts under the title.actions(optional): buttons on the right.rightis the older name of the same slot and still works; when both are given, both show.
| Prop | Type | Default |
|---|---|---|
title |
String |
required |
sub |
String |
optional |
right |
Option<Children> |
optional |
back_href |
String |
optional |
back_label |
String |
optional |
meta |
Option<Children> |
optional |
actions |
Option<Children> |
optional |
A dialog over the page, open while open is true.
-
title: shown in the header; also the accessible name of the dialog. AString, a&str, a signal or a closure, so it can name the item (“Delete fx-demo?”) and change while the dialog is open. -
size:"sm"(400px),"md"(520px, default),"lg"(760px) or"xl"(1060px). On a small screen the dialog is the screen width less a 16px margin. -
footer(optional): buttons in a bar under the body, on the right. -
close_on_scrim(default true): a click on the dim area closes it. -
locked(optional): while true, Escape, the scrim and × do not close it (use it while a request runs). -
on_close(optional): runs when the person closes the dialog with Escape, the scrim or ×. -
in_place: render the dialog where the component is. By default it is moved to the end of<body>when it opens, so no rule of the page can shrink or clip it.
On open, focus moves into the dialog: to an element with
data-autofocus, else the first control in the body, else the footer.
Tab and Shift+Tab stay inside. On close, focus goes back to the element
that had it before.
| Prop | Type | Default |
|---|---|---|
open |
RwSignal<bool> |
required |
title |
Signal<String> |
required |
size |
String |
optional |
footer |
Option<ChildrenFn> |
optional |
close_on_scrim |
bool |
true |
locked |
Signal<bool> |
optional |
on_close |
Option<Callback<()>> |
optional |
in_place |
bool |
optional |
children |
ChildrenFn |
required |
Drawer
Section titled “Drawer”A panel that slides in from the right, over a scrim (a detail view).
Same props and keyboard behaviour as Modal. size: "sm" (360px),
"md" (430px, default), "lg" (640px) or "xl" (860px); never wider than
92% of the screen.
| Prop | Type | Default |
|---|---|---|
open |
RwSignal<bool> |
required |
title |
Signal<String> |
required |
size |
String |
optional |
footer |
Option<ChildrenFn> |
optional |
close_on_scrim |
bool |
true |
locked |
Signal<bool> |
optional |
on_close |
Option<Callback<()>> |
optional |
in_place |
bool |
optional |
children |
ChildrenFn |
required |
ConfirmDialog
Section titled “ConfirmDialog”A confirmation for an action that destroys or changes data.
title: the question (“Delete workflow?”). AString, a&str, a signal or a closure (title=move || format!("Delete {}?", name.get())).message(optional): what happens, in one or two sentences.impacts(optional): a list of what the action also changes (for example the items an archive cascades to), underimpacts_label.confirm_text(optional): the person must type this text (a name) to enable the confirm button.confirm_label/cancel_label: button text (“Confirm” / “Cancel”).danger(default true): the confirm button is red.busy(optional): while true, the buttons are disabled, the confirm button shows a spinner, and the dialog does not close.on_confirm: runs when the person confirms. The dialog stays open: setopento false when the work is done (or at once).on_cancel(optional): runs on Cancel, Escape, the scrim or ×. The dialog closes itself.notice(optional): content between the message and the impacts list, such as a warning that must be read before the list.- children (optional): more content under the list (an error, a preview).
initial_focus: the button that has focus when the dialog opens,"cancel"(default) or"confirm". Withconfirm_text, the text field has it.alert:role="alertdialog", for a question the person must answer now; the message is its description, and a click on the scrim does not close it (AURORA-T-0013 item 17).in_place: as onModal.
| Prop | Type | Default |
|---|---|---|
open |
RwSignal<bool> |
required |
title |
Signal<String> |
required |
message |
String |
optional |
impacts |
Signal<Vec<String>> |
optional |
impacts_label |
String |
"This also changes:" |
confirm_text |
String |
optional |
confirm_label |
String |
"Confirm" |
cancel_label |
String |
"Cancel" |
danger |
bool |
true |
busy |
Signal<bool> |
optional |
size |
String |
"sm" |
on_confirm |
Callback<()> |
required |
on_cancel |
Option<Callback<()>> |
optional |
notice |
Option<ChildrenFn> |
optional |
children |
Option<ChildrenFn> |
optional |
initial_focus |
String |
"cancel" |
alert |
bool |
optional |
in_place |
bool |
optional |
ToastStack
Section titled “ToastStack”The stack of toasts at the bottom right. Mount it once, near the app root.
duration_ms(default 5000): time on screen of a toast. The timers stop while the pointer is over the stack or focus is in it.toaster(optional): the queue to show. By default the one in the context; if there is none, the stack makes one and provides it.
A click on a toast dismisses it. Motion stops when the OS asks for reduced motion.
Screen readers hear each new toast from two live regions that the stack
keeps on the page from the start: errors from an assertive one
(role="alert"), the others from a polite one (role="status"). A region
that comes with its text is often not read (AURORA-T-0013 item 15).
| Prop | Type | Default |
|---|---|---|
duration_ms |
u64 |
5000 |
toaster |
Option<Toaster> |
optional |
A tab list with an underline, and the panels under it.
tabs: the tabs (TabItem).value: the selected tab’s value. A click or an arrow key sets it.label(optional): the accessible name of the tab list.- children (optional):
TabPanels. Leave them out for route tabs, where the page under the tabs is the router outlet.
Signal tabs are buttons: ArrowLeft / ArrowRight / Home / End move focus and
select. Route tabs (a TabItem::href) are links: the arrow keys move
focus, and Enter opens the link; set value from the route.
| Prop | Type | Default |
|---|---|---|
tabs |
Vec<TabItem> |
required |
value |
RwSignal<String> |
required |
label |
String |
optional |
children |
Option<Children> |
optional |
TabPanel
Section titled “TabPanel”The content of one tab. Put it inside Tabs; value matches a
TabItem::value. Only the selected panel renders its children.
| Prop | Type | Default |
|---|---|---|
value |
String |
required |
children |
ChildrenFn |
required |
A panel with no header, for grids of things (boards, flows, agents).
href(optional): the card is a link (<a>).on_click(optional): the card is a button (role="button", focusable, Enter and Space run it). Withhreftoo, it runs on click of the link.title(optional): a bold first line.label(optional): the accessible name, when the content is not a good one.selected(optional): draws the card as selected.
With neither href nor on_click, the card is a static panel. An
interactive card has hover and focus states.
| Prop | Type | Default |
|---|---|---|
href |
String |
optional |
on_click |
Option<Callback<()>> |
optional |
title |
String |
optional |
label |
String |
optional |
selected |
Signal<bool> |
optional |
children |
Children |
required |
SecretReveal
Section titled “SecretReveal”Shows a secret one time (a new API key, a token, a recovery code): a warning line, the secret in a mono block with a copy button, and an “I saved it” button.
Put it in a Modal with close_on_scrim=false, and clear the secret
in on_done, so the secret is not in memory after the person closes it.
secret: the text to show.label(optional): what the secret is (“API key”), above the block.warning(default: “Copy this now. You cannot see it again after you close this.”): the line at the top.done_label(default “I saved it”) andon_done: the close button.
| Prop | Type | Default |
|---|---|---|
secret |
Signal<String> |
required |
label |
String |
optional |
warning |
String |
"Copy this now. You cannot see it again after you close this." |
done_label |
String |
"I saved it" |
on_done |
Option<Callback<()>> |
optional |
CenterScreen
Section titled “CenterScreen”A full-screen area with its content in the centre, on the page
background: for sign-in, the OAuth callback, and “no access” or “loading
the session” states. Put an AuthCard in it.
contained: a fixed height (360px) in place of the full screen, for a
gallery or a docs page.
| Prop | Type | Default |
|---|---|---|
contained |
bool |
optional |
children |
Children |
required |
AuthCard
Section titled “AuthCard”A centred card for a sign-in form or a gate state.
brand(optional): the product mark, at the top.title: an<h1>.sub(optional): a line under it.children: the form, aLoading, anAlert, a button.footer(optional): a line at the bottom (a link to help, the version).
| Prop | Type | Default |
|---|---|---|
title |
String |
required |
sub |
String |
optional |
brand |
Option<Children> |
optional |
footer |
Option<Children> |
optional |
children |
Children |
required |
Controls
Section titled “Controls”use aurora_leptos::components::*;
Checkbox
Section titled “Checkbox”A checkbox, bound to checked.
label: the text after the box; a click on it toggles the box.indeterminate(optional): shows a dash (“some of them”), for a box that checks a list. A signal or a closure.description,error,disabled,required,name,value,id,aria_label,described_by: as on a text field.on_change: runs with the new state.
| Prop | Type | Default |
|---|---|---|
checked |
RwSignal<bool> |
required |
label |
String |
optional |
indeterminate |
Signal<bool> |
optional |
description |
Signal<String> |
optional |
described_by |
String |
optional |
error |
Signal<String> |
optional |
disabled |
Signal<bool> |
optional |
required |
bool |
optional |
name |
String |
optional |
value |
String |
optional |
id |
String |
optional |
aria_label |
String |
optional |
on_change |
Option<Callback<bool>> |
optional |
FileInput
Section titled “FileInput”A file picker: a button that opens the browser’s file dialog, and the names of the files chosen.
accept: the file types (".srt,.vtt","image/*").multiple: more than one file.button_label: the text of the button (default “Choose file”).on_change: runs with the chosen files.label,description,error,disabled,required,name,id,aria_label,described_by: as on a text field.
The <input type="file"> is in the page and takes focus; only its look is
replaced. Its label is label, or aria_label, or the button text.
| Prop | Type | Default |
|---|---|---|
label |
String |
optional |
accept |
String |
optional |
multiple |
bool |
optional |
button_label |
String |
"Choose file" |
empty_label |
String |
"No file chosen" |
description |
Signal<String> |
optional |
described_by |
String |
optional |
error |
Signal<String> |
optional |
disabled |
Signal<bool> |
optional |
required |
bool |
optional |
name |
String |
optional |
id |
String |
optional |
aria_label |
String |
optional |
on_change |
Option<Callback<Vec<web_sys::File>>> |
optional |
Slider
Section titled “Slider”A slider (a native range input), bound to value.
min(default 0),max(default 100),step(default 1).show_value(default true): the value at the end of the label line.format(optional) makes its text (“40%”, “2.5 MB/s”); it is also thearia-valuetext.label,description,disabled,name,id,aria_label,described_by: as on a text field.on_input: runs on each move.on_change: runs when the person lets go.
| Prop | Type | Default |
|---|---|---|
value |
RwSignal<f64> |
required |
min |
f64 |
0.0 |
max |
f64 |
100.0 |
step |
f64 |
1.0 |
show_value |
bool |
true |
format |
Option<Callback<f64, String>> |
optional |
label |
String |
optional |
description |
Signal<String> |
optional |
described_by |
String |
optional |
disabled |
Signal<bool> |
optional |
name |
String |
optional |
id |
String |
optional |
aria_label |
String |
optional |
on_input |
Option<Callback<f64>> |
optional |
on_change |
Option<Callback<f64>> |
optional |
Combobox
Section titled “Combobox”A text field with a list of choices that narrows as the person types (the
ARIA combobox pattern). value holds the value of the chosen choice.
options:(value, label)choices. AVec, a signal or a closure.placeholder,empty_text(default “No matches”).label,description,error,disabled,required,name,id,aria_label,described_by: as on a text field.on_change: runs with the value of a choice when the person picks it.
ArrowDown and ArrowUp open the list and move through it; Enter picks; Escape closes the list, and a second Escape clears the text. When the field loses focus the text goes back to the label of the chosen value.
| Prop | Type | Default |
|---|---|---|
value |
RwSignal<String> |
required |
options |
Signal<Vec<(String, String)>> |
required |
label |
String |
optional |
placeholder |
String |
optional |
empty_text |
String |
"No matches" |
description |
Signal<String> |
optional |
described_by |
String |
optional |
error |
Signal<String> |
optional |
disabled |
Signal<bool> |
optional |
required |
bool |
optional |
name |
String |
optional |
id |
String |
optional |
aria_label |
String |
optional |
on_change |
Option<Callback<String>> |
optional |
use aurora_leptos::components::*;
RelativeTime
Section titled “RelativeTime”A time as “3m ago”, in a <time datetime="...">. The full local time shows
as a tooltip (title). It moves on once a second with the shared clock.
Give the time as at (ms since the epoch) or as iso (a string such as
2026-09-30T12:04:53Z). With neither, or a time the browser cannot read,
it shows fallback (“—”).
For a duration (“4.2s”, “3m 05s”) use format_duration.
| Prop | Type | Default |
|---|---|---|
at |
MaybeProp<f64> |
optional |
iso |
MaybeProp<String> |
optional |
fallback |
String |
"—" |
LiveIndicator
Section titled “LiveIndicator”A dot and a word for the state of a live stream: live, connecting or offline. The dot pulses only while live, and not at all when the system asks for less motion.
state: a signal ofLiveState.live_label/connecting_label/offline_label: the words (defaults “Live”, “Connecting”, “Offline”).compact: the dot only; the word goes to the tooltip and the accessible name.
It is a role="status" region, so a screen reader says the new state.
| Prop | Type | Default |
|---|---|---|
state |
Signal<LiveState> |
required |
live_label |
String |
"Live" |
connecting_label |
String |
"Connecting" |
offline_label |
String |
"Offline" |
compact |
bool |
optional |
StatTile
Section titled “StatTile”A KPI tile: a mono uppercase label, a big value, a unit, and a line under
it (a delta and/or a sub line). A slot at the bottom takes a
Sparkline.
color(optional): a hue token for the value (and the sparkline in the slot). Default: the bright text colour.delta(optional): a change, such as"+12%", indelta_color(a hue token; default muted).sub(optional): a short line such as"last 24h".text: the value is text (a name,"just now"), not a figure. It is set smaller, on one line, and a long value ends in an ellipsis. The full value is thetitleof the value.
| Prop | Type | Default |
|---|---|---|
label |
String |
required |
value |
Signal<String> |
required |
text |
bool |
optional |
unit |
String |
optional |
sub |
MaybeProp<String> |
optional |
delta |
MaybeProp<String> |
optional |
delta_color |
String |
optional |
color |
String |
optional |
spark |
Option<Children> |
optional |
Sparkline
Section titled “Sparkline”A tiny chart of a series: a line (default) or bars. It draws in
currentColor, so it takes the colour of its parent, or color.
bars: bars in place of a line.fill: a light fill under the line.width/height: the size in px (default 120 × 28).fluid: the full width of the parent,heighthigh.zero_base(default true): the bottom of the chart is 0 when all values are positive. Set it false to show small changes of a large value.label: the accessible name (for example “Requests, last hour”). With no label the chart is hidden from screen readers.
| Prop | Type | Default |
|---|---|---|
values |
Signal<Vec<f64>> |
required |
bars |
bool |
optional |
fill |
bool |
optional |
width |
f64 |
120.0 |
height |
f64 |
28.0 |
fluid |
bool |
optional |
zero_base |
bool |
true |
color |
String |
optional |
label |
String |
optional |
SegmentedBar
Section titled “SegmentedBar”A bar in parts that shows proportions: ok / warning / failed, or done / active / to do. Each part has a tooltip “label: value”.
legend: a row under the bar with a dot, the label and the value of each part.label: the accessible name of the bar (the parts are read after it).height(default 8 px).
For one value from 0 to 100, use Meter.
| Prop | Type | Default |
|---|---|---|
segments |
Signal<Vec<Segment>> |
required |
legend |
bool |
optional |
label |
String |
optional |
height |
u32 |
8 |
DetailList
Section titled “DetailList”A list of label / value rows (a <dl>). Put KeyValue rows in it.
mono: all values in the mono font (ids, hashes, times).dividers(default true): a hairline between rows.stacked: the label over the value, in a grid of columns (for a summary strip). Default: the label on the left, the value on the right of it.label_width(default"140px"): the width of the label column.
| Prop | Type | Default |
|---|---|---|
mono |
bool |
optional |
dividers |
bool |
true |
stacked |
bool |
optional |
label_width |
String |
optional |
children |
Children |
required |
KeyValue
Section titled “KeyValue”One row of a DetailList: a label and a value (the children: text, a
Pill, a RelativeTime, a link…). mono sets this value in the mono
font.
| Prop | Type | Default |
|---|---|---|
label |
String |
required |
mono |
bool |
optional |
children |
Children |
required |
SectionLabel
Section titled “SectionLabel”A section heading in the mono uppercase “eyebrow” style, with an optional count and an action on the right (a link, a small button).
level(default 3): the heading level, 2 to 6.divider: a hairline under the heading.
| Prop | Type | Default |
|---|---|---|
label |
String |
required |
count |
MaybeProp<usize> |
optional |
action |
Option<Children> |
optional |
divider |
bool |
optional |
level |
u8 |
3 |
CodeBlock
Section titled “CodeBlock”A block of code or text: mono, on the inset surface, scrolls in both
directions up to max_height, with a copy button.
max_height(default"320px").copy(default true): a copy button at the top right.wrap: wrap long lines in place of a horizontal scroll.label: the accessible name of the scroll area.
| Prop | Type | Default |
|---|---|---|
code |
Signal<String> |
required |
max_height |
String |
"320px" |
copy |
bool |
true |
wrap |
bool |
optional |
label |
String |
"Code" |
LogView
Section titled “LogView”A log or an event list: mono lines on the inset surface, each with an
optional time and level pill. It scrolls up to max_height.
follow(default true): stay at the newest line while lines come in. When the person scrolls up, it stops; a “Jump to latest” button brings it back.copy(default true): a button that copies all lines as text.empty: the text when there are no lines (default “No lines yet.”).label: the accessible name (default “Log”).
The region is role="log" with aria-live="off": a screen reader can
read it, but it does not say each new line.
| Prop | Type | Default |
|---|---|---|
lines |
Signal<Vec<LogLine>> |
required |
max_height |
String |
"320px" |
follow |
bool |
true |
copy |
bool |
true |
empty |
String |
"No lines yet." |
label |
String |
"Log" |
FeedList
Section titled “FeedList”A list of feed rows (an activity feed, a run feed). Put FeedRows in
it. label is the accessible name of the list.
| Prop | Type | Default |
|---|---|---|
label |
String |
optional |
children |
Children |
required |
FeedRow
Section titled “FeedRow”One event in a FeedList: time, a dot, the subject, a status pill and
a line of text (the children).
at(ms since the epoch): shown as aRelativeTime. Ortime: a time that is already formatted.subject: the thing the event is about (mono).actor: who did it.status: a pill; its hue isstatus_colorunless you givestatus_color.dot: a hue token for a status dot at the start.href: the row is a link.on_click: the row is a button. With neither, the row is plain text.keep_time_slot: keep the empty time column when the row has noatand notime, so it lines up with rows that have one. By default a row with no time has no time column.
| Prop | Type | Default |
|---|---|---|
at |
Option<f64> |
optional |
time |
String |
optional |
subject |
String |
optional |
actor |
String |
optional |
status |
String |
optional |
status_color |
String |
optional |
dot |
String |
optional |
href |
String |
optional |
on_click |
Option<Callback<()>> |
optional |
keep_time_slot |
bool |
optional |
children |
Option<Children> |
optional |
Pagination
Section titled “Pagination”Previous / Next buttons, the range (“41–60 of 212”), and an optional page size select, for a list that the server pages with an offset and a limit.
-
offset/limit: the page; the buttons and the select change them. -
total: the number of items in the whole list. -
page_sizes(optional): the choices of the “Rows” select, for examplevec![20, 50, 100]. With none, there is no select. -
on_change(optional): runs with(offset, limit)after a change. -
show_range(default true): show the range text.falsehides it. -
range_label(optional): makes the range text from thePageRange(for example “Page 3 of 11”). Default:page_range_label(“41–60 of 212”). -
disabled(optional): while true, the buttons and the select do nothing. -
busy(optional): while true (a page is loading), the same, and the pager hasaria-busy="true"and shows a small spinner (AURORA-T-0013 item 18).
A new page size keeps the first item of the page in view.
| Prop | Type | Default |
|---|---|---|
offset |
RwSignal<usize> |
required |
limit |
RwSignal<usize> |
required |
total |
Signal<usize> |
required |
page_sizes |
Vec<usize> |
optional |
prev_label |
String |
"Previous" |
next_label |
String |
"Next" |
on_change |
Option<Callback<(usize, usize)>> |
optional |
show_range |
bool |
true |
range_label |
Option<Callback<PageRange, String>> |
optional |
disabled |
Signal<bool> |
optional |
busy |
Signal<bool> |
optional |
Widgets
Section titled “Widgets”use aurora_leptos::widgets::*;
A thin horizontal progress / freshness bar. value is 0–100 (a number
or a signal); color defaults to the ok/green token. label (optional)
makes it a role="meter" with that accessible name.
indeterminate: work of unknown length. A short bar sweeps across (a
still bar when the OS asks for less motion), value is not used, and the
bar is a role="progressbar" with no value, named by label (default
“Loading”). Its colour defaults to the ice/accent token.
For a bar in several parts, use
SegmentedBar.
| Prop | Type | Default |
|---|---|---|
value |
Signal<f64> |
optional |
color |
String |
optional |
label |
String |
optional |
indeterminate |
bool |
optional |
Banner
Section titled “Banner”A tinted callout banner. color sets the accent (defaults to gold/warn);
icon defaults to a warning triangle.
| Prop | Type | Default |
|---|---|---|
color |
String |
optional |
icon |
String |
optional |
children |
Children |
required |
HealthPill
Section titled “HealthPill”A status/health pill with an optional explanatory tooltip. The caller supplies
the display label, color, and tip (no built-in vocab).
| Prop | Type | Default |
|---|---|---|
label |
String |
required |
color |
String |
required |
tip |
String |
optional |
BuildStatusBadge
Section titled “BuildStatusBadge”A CI build state as a pill: success is ok, failed bad, building ice, pending and other text muted.
| Prop | Type | Default |
|---|---|---|
status |
String |
required |
use aurora_leptos::graph::*;
A layered graph. Aurora does the layout and the interaction; the product gives the data.
let nodes = vec![ DagNode::new("fetch", "fetch").status(Hue::Ok), DagNode::new("load", "load").status(Hue::Ice),];let edges = vec![DagEdge::new("fetch", "load").style("ok")];let styles = vec![EdgeStyle::new("ok", "Succeeded", Hue::Ok)];view! { <Dag nodes edges styles legend=true on_select=Callback::new(move |id: String| selected.set(Some(id))) />}| Prop | Type | Default | Note |
|---|---|---|---|
nodes |
Vec<DagNode> |
required | |
edges |
Vec<DagEdge> |
required | |
lanes |
Vec<DagLane> |
optional | Lane labels and anchors. A node’s lane works without one. |
layers |
Vec<String> |
optional | Layer headers (column labels), in layer order. |
styles |
Option<Vec<EdgeStyle>> |
optional | The edge styles. The built-in default and active are added when not named here. |
options |
Option<LayoutOptions> |
optional | Sizes and gaps. direction, align, node_w and node_h override it. |
direction |
Option<Direction> |
optional | |
align |
Option<Align> |
optional | |
node_w |
Option<f64> |
optional | |
node_h |
Option<f64> |
optional | |
selected |
Option<Signal<Option<String>>> |
optional | The selected node id, when the product holds the selection. Without it, the graph holds the selection itself. |
on_select |
Option<Callback<String>> |
optional | Click, Space, or Enter on a node that is not selected. |
on_open |
Option<Callback<String>> |
optional | Double click, or Enter on the selected node. |
on_more |
Option<Callback<String>> |
optional | Click or Enter on the “+N” badge of a node. |
legend |
bool |
optional | Show a legend of the edge styles that the graph uses. |
label |
Option<String> |
optional | The accessible name of the graph. |
fit |
bool |
true |
true (default): shrink to the width of the container. false: natural size, with scroll bars. |
id |
String |
optional | The id of the <svg>, and the start of the marker ids ({id}-arrow-{style}, see dag_marker_id). Default: a unique cl-dag-N. |
defer_select |
bool |
optional | A click waits DOUBLE_CLICK_MS before on_select; a double click in that time runs only on_open. Use it when a select navigates away. Keyboard select does not wait. |
DagLegend
Section titled “DagLegend”A legend of edge styles: a sample line with its arrowhead and the label
of each style. Dag shows one with legend=true (only the styles that
its edges use); use this component alone to list other styles.
| Prop | Type | Default |
|---|---|---|
styles |
Vec<EdgeStyle> |
required |
The old graph component: nodes + edges, auto-laid-out. A thin wrapper
over Dag; new code uses Dag for lanes, fixed layers, edge styles
and a legend.
| Prop | Type | Default | Note |
|---|---|---|---|
nodes |
Vec<GraphNode> |
required | |
edges |
Vec<GraphEdge> |
required | |
direction |
String |
optional | “TB” (top-to-bottom, default) or “LR” (left-to-right). |
node_w |
f64 |
150.0 |
|
node_h |
f64 |
48.0 |
|
on_select |
Option<Callback<String>> |
optional | Click, Space or Enter on a node. |
on_open |
Option<Callback<String>> |
optional | Double click, or Enter on the selected node. |
use aurora_leptos::components::*; (or aurora_leptos::icons::*)
Small SVG icons in currentColor: an icon takes the text colour of its
parent. Each icon has two props:
| Prop | Type | Default | Note |
|---|---|---|---|
size |
u32 |
16 |
The width and the height, in px. |
title |
String |
optional | The accessible name. With a title the icon is role="img"; without one it is aria-hidden. |
IconChevron also has dir (String, optional): the way it points.
| Icon | Drawn | Note |
|---|---|---|
IconPlay |
filled | A right-pointing triangle (run, start). |
IconPause |
filled | Two bars (pause). |
IconBolt |
outline | A lightning bolt (fire, trigger). |
IconCopy |
outline | Two sheets (copy to the clipboard). |
IconClose |
outline | An × (close, remove). |
IconExternal |
outline | A box with an arrow out of it (opens somewhere else). |
IconCheck |
outline | A tick (done, copied). |
IconAlert |
outline | A triangle with “!” (warning). |
IconInfo |
outline | A circle with “i” (information). |
IconMenu |
outline | Three lines (open a menu). |
IconSearch |
outline | A magnifier (search). |
IconSun |
outline | A sun (light theme). |
IconMoon |
outline | A moon (dark theme). |
IconMonitor |
outline | A screen (follow the system setting). |