Overview
UseListItemButton for action rows and standalone selection buttons. It combines ListItem layout with a native button, including Enter and Space activation, focus, and disabled behavior. It defaults to type="button".
Usage
Actions and disabled state
PassonClick and disabled directly. Disabled buttons use the matching row appearance, prevent activation, and leave the tab order.
focusableWhenDisabled to keep a disabled button focusable. It uses aria-disabled and continues to block activation. Native button attributes, events, styles, class names, and an HTMLButtonElement ref reach the button. Events bubble normally; callers supply any stopPropagation() or preventDefault() policy.
Selection and visual slots
Your application owns the independentactive, selected, and focused states. Use active for the open or current row. Pair selected with the appropriate accessible state, such as aria-pressed for a toggle button. focused highlights the row without moving DOM focus. Indicators and shortcut hints are decorative; your application registers shortcuts and handles navigation.
startIcon, endIcon, description, and descriptionPlacement for supporting content. color="danger" marks a destructive action. shortcutJoinLabel controls the text between sequential shortcuts, and hasSubmenu displays a submenu indicator.
Multiline supporting content
SetdescriptionPlacement="below" to wrap supporting text beneath the label. The label retains its truncation behavior. Pass Text with truncate or lineClamp as description when you need a shorter preview. The inline and end placements keep their existing appearance.
active applies the current-row background. Set selectionAppearance="accent" for an accent fill on selected rows with any description placement; the default preserves the existing indicator-based selection styling. focused applies the shared highlighted background; the focus-visible outline follows actual keyboard focus. These props do not add accessible state or move focus. Native button activation and disabled behavior remain unchanged.
Independent controls
Keep independent buttons and checkboxes besideListItemButton so each retains its own focus and activation. Do not nest them in its content or icon slots. The component has no actions slot. Use a ListItem with its default div root for a row with independent controls, and supply disabled behavior and event propagation on each control.
ListItem for passive content, links, or custom semantic owners. Use the existing Dropdown, and Select item parts within their popup owners, which supply roles and keyboard navigation.
Props
boolean
Marks the open or current item independently of selection and focus. The caller supplies accessible state.
"danger" | "neutral"
Color of the text and icons.
danger marks a destructive action.ReactNode
Supporting text, placed according to
descriptionPlacement."below" | "end" | "inline"
Places supporting content inline after the label, at the end, or below it with wrapping. Inline is the default.
boolean
default:"false"
Disables activation and applies the matching row appearance.
ReactNode
Icon rendered after the content.
boolean
default:"false"
Keeps a disabled button focusable with aria-disabled while preventing activation.
boolean
Highlights the row without moving DOM focus.
Displays a decorative submenu indicator.
"check" | "checkbox" | "none"
Selection indicator: a check icon after the content or a checkbox before
it.
Ref<HTMLButtonElement>
Ref to the native HTMLButtonElement.
boolean
Applies selected styling and a decorative indicator. The caller supplies selection state and accessible semantics.
"accent" | "default"
Selection styling independent of description placement.
default preserves indicator-based styling; accent fills selected rows with the accent background.ShortcutDefinition
Displays decorative shortcut hints. The caller registers the shortcuts.
string
Text between sequential shortcut steps. Defaults to
then; pass an empty string to omit it.ReactNode
Icon rendered before the content.