Skip to content
Kimenpre-v1documentation home
Color scheme

ki-sidebar-item

Give an item its native link destination with href and its name through the default slot. Mark the current destination with current. Use icon-name for a registered glyph or the start slot for a decorative glyph.

Theme for this example
Color scheme for this example
Inbox
<ki-sidebar label="Main" collapsible>
<ki-sidebar-item href="#inbox" count="12" current>Inbox</ki-sidebar-item>
</ki-sidebar>

A positive count shows as a pill in the panel and a dot in the rail. count-label localizes the accessible name using {label} and {count}.

When to use: link to a named destination in ki-sidebar or ki-sidebar-group. Register ki-tooltip once when using direct component imports for a rail.

When not to use: for commands, nested controls, or standalone links outside the sidebar.

Properties & attributes

AttributePropertyTypeDefaultDescription
countcountnumber | undefined–Positive unread count. Fractional values round down.
count-labelcountLabelstring'{label}, {count} new'Accessible count template, using the {label} and {count} placeholders.
currentcurrentbooleanfalseMark this destination as the current page.
hrefhrefstring | undefined–Destination resolved by a native link. Omit for a static row.
icon-nameiconNamestring | undefined–Name of a registered Lucide glyph. Import its per-icon entry point first.

Slots

SlotDescription
(default)The destination name as text or static inline content.
startOne decorative icon that overrides icon-name.

CSS parts

PartDescription
countExpanded pill or rail dot.
itemNavigation link or static row.
labelDestination text.
startLeading icon holder.

CSS custom properties

The public styling contract of ki-sidebar-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-focus-ring-colorColour of the keyboard focus ring every focusable component draws: 3:1 or more against the page in every theme and scheme.
--ki-focus-ring-offsetGap between a focusable component and its keyboard focus ring.
--ki-focus-ring-widthThickness of the keyboard focus ring every focusable component draws (its outline). One token instead of one per component, so a mode or a theme changes every ring at once.
--ki-sidebar-border-widthWidth of the panel outline.
--ki-sidebar-font-familyTypeface of sidebar controls and copy.
--ki-sidebar-font-sizeFont size of navigation labels.
--ki-sidebar-gapSpace between panel regions and between row contents.
--ki-sidebar-icon-sizeLeading and toggle icon edge.
--ki-sidebar-item-backdrop-filterComplete backdrop filter for the row or toggle.
--ki-sidebar-item-bgResting row background.
--ki-sidebar-item-bg-imageOptional image over navigation row and toggle backgrounds.
--ki-sidebar-item-count-backdrop-filterComplete backdrop filter behind the count.
--ki-sidebar-item-count-bgExpanded count pill background.
--ki-sidebar-item-count-bg-imageOptional image over the count background.
--ki-sidebar-item-count-fgExpanded count digits.
--ki-sidebar-item-current-bgCurrent destination background.
--ki-sidebar-item-current-fgCurrent destination ink.
--ki-sidebar-item-dot-bgUnread dot fill in rail mode.
--ki-sidebar-item-dot-offsetInset of the dot from the row block-start and inline-end edges.
--ki-sidebar-item-dot-ringOuter ring that separates the rail dot from the row.
--ki-sidebar-item-fgResting row ink, with contrast-more support.
--ki-sidebar-item-heightBase row and toggle height before density adjustment.
--ki-sidebar-item-hover-bgHovered navigation row background.
--ki-sidebar-item-hover-fgHovered navigation row ink.
--ki-sidebar-item-paddingInline inset of an expanded row.
--ki-sidebar-item-radiusCorner of a row or toggle.
--ki-sidebar-item-weightWeight of the navigation label.
--ki-sidebar-line-heightLine height of navigation labels.
--ki-typography-visually-hidden-sizeNonzero edge for clipped text available to assistive technology.