Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Primitives
  2. Item
  3. API and Development

Item

API and Development

View SourceOpens in a new tabSubmit IssueOpens in a new tab
Import Item from @prepared911/ui/item. Props are a union: link (href), clickable (onClick and no href), or static (neither).
PropMeaning
hrefLink row. Navigation target.
onClickClickable row when href is omitted. Optional on a link row, after navigation intent.
childrenRow content.
iconLeading glyph at 16px.
trailingIconTrailing glyph at 16px.
activeSelected or pressed treatment. On a link, also aria-current.
disabledInert interaction.
classNameClasses on the outer li.
interactableClassNameClasses on the inner link or button.
refOuter li in static mode; inner anchor or button in link and clickable modes.
roleClickable only. Role of the button. Default is button.
listItemRoleClickable only. "none" on the outer li.
tabIndexClickable only. Tab order of the button.
aria-checkedClickable only. Checkable roles such as menuitemcheckbox.
aria-selectedClickable only. The option role.
Shared interaction fields include id, aria-label, aria-description, aria-labelledby, aria-describedby, aria-controls, aria-expanded, aria-haspopup, aria-current, and the focus, keyboard, and pointer handlers listed on ItemInteractableProps.
Example
Props
NameTypeDefaultDescription
activeboolean—Selected or pressed row treatment (not navigation aria-current).
aria-checkedboolean | "false" | "mixed" | "true"—Checked state of the button for a checkable role such as menuitemcheckbox.
aria-controlsstring—Id of the element controlled by this control.
aria-currentboolean | "false" | "true" | "page" | "step" | "location" | "date" | "time"—Whether this item is current within a set.
aria-describedbystring—Id of the element that describes this control.
aria-descriptionLocalizedMessage—Accessible description when it cannot be referenced by id.
aria-expandedboolean—Whether the controlled region is expanded.
aria-haspopupboolean | "dialog" | "grid" | "listbox" | "menu" | "tree" | "false" | "true"—Type of popup triggered by this control, if any.
aria-labelLocalizedMessage—Accessible name when the visible label is insufficient.
aria-labelledbystring—Id of the element that names this control.
aria-selectedBooleanish—Selected state of the button for the option role.
childrenReactNode—Row content. Compose {@link Text} with foreground={Foreground.Inherit} so label color follows the row.
classNamestring—Classes on the outer li.
disabledboolean—Inert interaction.
hrefstring—Navigation target.
iconGlyph—Leading icon at 16px (IconSize.Small), tinted by the row foreground.
idstring—Element id for ARIA relationships.
interactableClassNamestring—Classes on the inner link or clickable surface.
listItemRole"none"—Role of the outer li. Pass "none" when the owner's role requires its items to carry no list-item semantics, as menu does, so the button is the item.
onClick((event: MouseEvent<HTMLElement, MouseEvent>) => void) | ((event: MouseEvent<HTMLElement, MouseEvent>) => void)—Optional click handler after navigation intent. Activates the row.
refRef<HTMLElement>—Ref to the outer li in static mode; to the inner anchor or button in link and clickable modes.
roleAriaRole—Role of the row's button. A collection owner sets the role its popup requires of its items, such as menuitem, menuitemcheckbox or menuitemradio; the button role is the default.
tabIndexnumber—Tab order of the button. A roving-focus owner passes -1 or 0 per item.
trailingIconGlyph—Trailing icon at 16px (IconSize.Small), tinted by the row foreground.
Storybook
Interactive examples and edge cases for this component are in Storybook.
DefaultOpens in a new tab
Previous
Item / Usage
Next
Item / Accessibility
On this page
Example
Props
Storybook