Skip to content
Kimenpre-v1documentation home
Color scheme

ki-mobile-nav-item

Place this link directly inside ki-mobile-nav. Register the glyph referenced by icon-name and supply short, visible destination text in the default slot. Set current on the item that matches the route.

<ki-mobile-nav-item href="/inbox" icon-name="inbox" count="3">Inbox</ki-mobile-nav-item>

The example’s link name is “Inbox, 3 new”. The badge displays 99+ for larger counts and the accessible name includes the full count. To localize the unread suffix, supply a count-label with a {count} placeholder.

API reference

When to use: Place directly in ki-mobile-nav. Register a decorative icon and supply a short visible text label. Leave the catalog click action unset for native navigation.

When not to use: For a command on the current page, use a button. For inline navigation outside a bottom bar, use ki-link.

Properties & attributes

AttributePropertyTypeDefaultDescription
countcountnumber | undefined–Optional count of new items. Only finite counts of at least one are shown. The painted count is abbreviated above 99.
count-labelcountLabelstring'{count} new'Localized suffix for the link name. Use {count} for the full rounded count.
currentcurrentbooleanfalseMarks this link as the current page.
hrefhrefstring–Destination URL. Relative paths and fragments use native anchor resolution.
icon-nameiconNamestring–Registered icon name. The visible destination text supplies the link name.

Slots

SlotDescription
(default)Visible destination text. Use plain text or noninteractive phrasing content.

CSS parts

PartDescription
indicatorThe icon well painted on the current destination.
labelThe always-visible destination label.
linkThe native anchor and focus target.

CSS custom properties

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

TokenDescription
--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-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-mobile-nav-border-widthBar border width.
--ki-mobile-nav-font-familyTypeface for the bar and its destination labels.
--ki-mobile-nav-indicator-bgFill behind the current destination icon.
--ki-mobile-nav-indicator-block-sizeCurrent icon pill height.
--ki-mobile-nav-indicator-fgIcon ink on the current destination fill.
--ki-mobile-nav-indicator-inline-sizeCurrent icon pill width.
--ki-mobile-nav-indicator-radiusCurrent icon pill corner radius.
--ki-mobile-nav-item-current-fgLabel ink of the current destination on the fixed or floating bar.
--ki-mobile-nav-item-fgForeground ink of an inactive destination on the fixed or floating bar.
--ki-mobile-nav-item-focus-radiusCorner radius of the keyboard focus indication.
--ki-mobile-nav-item-font-sizeDestination label font size.
--ki-mobile-nav-item-font-weightDestination label font weight.
--ki-mobile-nav-item-gapGap between the glyph and its label.
--ki-mobile-nav-item-icon-sizeDestination glyph size.
--ki-mobile-nav-item-line-heightDestination label line height.
--ki-mobile-nav-item-target-minMinimum block and inline link target size.
--ki-typography-visually-hidden-sizeNonzero edge for clipped text available to assistive technology.

Workshop

Open MobileNav item in Storybook