Skip to content
Kimenpre-v1documentation home
Color scheme

ki-menu-item

Use this element as a child of Menu.

Give each item a value and a visible label. Use type="checkbox" for independent toggles or type="radio" for exclusive choices. Set disabled to keep an unavailable action discoverable by keyboard.

API reference

When to use: a command, independent checkbox action, or exclusive radio action in a menu.

When not to use: standalone controls, navigational links, or form options.

Properties & attributes

AttributePropertyTypeDefaultDescription
checkedcheckedbooleanfalseChecked state for checkbox and radio actions.
disableddisabledbooleanfalseDisabled actions remain discoverable via menu navigation.
shortcutshortcutstring''Display-only keyboard shortcut. Applications own shortcut registration.
tonetone"danger" | "neutral"'neutral'Apply the danger tone to a destructive action.
typetype"checkbox" | "item" | "radio"'item'Action role. A checkbox stays open. A radio selects one action within its group.
valuevaluestring''Action identifier reported by the parent menu.

Slots

SlotDescription
(default)The action's visible label.
startOne decorative icon or avatar before the label.

CSS parts

PartDescription
checkThe indicator of a checked action.
itemThe focusable action row.
shortcutThe display-only shortcut hint.

CSS custom properties

The public styling contract of ki-menu-item: reassign these tokens at :root or on a subtree — never override internals.

TokenDescription
--ki-density-control-offsetAdded to the block size of every scaled control and row (button, icon button, field, select, textarea, option, list item, tab). Components floor the result at ki.size.target-min.
--ki-density-target-minThe smallest pointer target any density may produce: 24 x 24 CSS px by default and in compact (WCAG 2.5.8 AA), 44 x 44 in touch (WCAG 2.5.5). It floors a shrinking control but never lifts what a control paints: a control painted smaller extends its target to it, invisibly; rows and tabs grow to it (spec 045 A1).
--ki-menu-focus-colorColor of a visible keyboard focus outline.
--ki-menu-focus-widthWidth of a visible keyboard focus outline.
--ki-menu-font-familyFamily for action labels and the filter.
--ki-menu-gapInline space between the parts of a row.
--ki-menu-inline-paddingStart and end inset of an action, group label, or filter.
--ki-menu-item-danger-fgForeground for destructive actions.
--ki-menu-item-danger-hover-fgForeground for hovered or keyboard-focused destructive actions.
--ki-menu-item-disabled-fgMuted ink of disabled actions.
--ki-menu-item-fgForeground for resting actions.
--ki-menu-item-heightDefault action row minimum height.
--ki-menu-item-hover-bgBackground behind hovered or keyboard-focused actions.
--ki-menu-item-hover-fgForeground for hovered or keyboard-focused actions.
--ki-menu-item-icon-sizeSize of an action glyph and the check indicator.
--ki-menu-item-paddingVertical inset used when an action wraps.
--ki-menu-item-radiusAction row corner radius.
--ki-menu-meta-fgForeground for shortcut hints and the filter placeholder.
--ki-menu-meta-font-sizeSize of metadata and group labels.
--ki-menu-meta-hover-fgForeground for shortcut hints on a hovered or focused action.
--ki-menu-touch-targetMinimum action and filter height for coarse pointers.