BottomNav
Mobile-first bottom navigation bar with item group selection, grow mode and layout system integration.
Preview
Rendering the live preview…
verticalRendering the live preview…
horizontalRendering the live preview…
shiftStructure
Anatomy
Visual breakdown of the component's internal structure with BEM class call-outs.
<origam-bottom-nav> — root bar ①, selected button ② and unselected buttons ③. The bar is a <nav> with aria-label="Bottom navigation".- 1.origam-bottom-nav
- Root
- 2.origam-bottom-nav__content
- Flex row containing all navigation buttons. justify-content: center by default.
- 3.origam-bottom-nav__btn
- Each OrigamBtn item. Gets --selected modifier when active in the group.
API
Props
All props accepted by this component, with their type, default value and description.
- growbooleanfalse
- When true, navigation buttons flex-grow to fill the full bar width equally.
- Layout mode of the child buttons: "vertical" stacks icon above label, "horizontal" places them side-by-side, "shift" slides label down when inactive.
- itemsArray<IBtnProps>[]
- Navigation items rendered as Btn-shaped descriptors. Each item can carry icon, text, to/href and active state.
- Horizontal placement when the bar does not span full width: "start", "center" or "end".
- tagstring'nav'
- HTML element rendered at the root. Defaults to <nav> for correct landmark semantics.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- color
- Intent or custom color propagated to all child Btn elements via OrigamDefaultsProvider.
- bgColor
- Background color of the bar itself.
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>false
- Applies a border (typically a top border to separate from page content).
- borderTopboolean | number | string
- borderLeftboolean | number | string
- borderBottomboolean | number | string
- borderRightboolean | number | string
- borderBlockboolean | number | string
- borderInlineboolean | number | string
- borderInlineStartboolean | number | string
- borderInlineEndboolean | number | string
- borderBlockStartboolean | number | string
- borderBlockEndboolean | number | string
- borderColorstring
- borderStylestring
- borderTopColorTColor
- borderRightColorTColor
- borderBottomColorTColor
- borderLeftColorTColor
- borderInlineStartColorTColor
- borderInlineEndColorTColor
- borderBlockStartColorTColor
- borderBlockEndColorTColor
- elevationTElevation
- Box-shadow elevation token.
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- heightnumber | string
- Override the bar height. Defaults to 48 px (density-adjusted).
- maxHeightnumber | string
- maxWidthnumber | string
- minHeightnumber | string
- minWidthnumber | string
- widthnumber | string
- Propagated to all child Btn elements. Affects bar height via density offset.
- Border-radius token or boolean.
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | number | string
- namestring'bottom-navigation'
- Layout system identifier. Sibling regions use this name to offset their bottom edge by the bar height.
- orderstring | number
- Layout order relative to other layout items (DrawerGroup, AppBar, etc.).
- absolutebooleanfalse
- Positions the bar absolutely rather than as a layout item.
- locationTDirectionBoth
- disabledboolean
- modelValueanytrue
- Controls bar visibility. Drives the slide-in/out transition. Supports v-model.
- multipleboolean
- mandatoryboolean
- maxnumber
- selectedClassstring'origam-bottom-nav__btn--selected'
- CSS class added to the currently-selected button in the group.
- hoverboolean | IStateEffectConfig
- hoverClassstring
- activeboolean | IStateEffectConfig
- activeClassstring
- Slide-in/out transition component. Defaults to OrigamTranslateBottom (slides up from the bottom). Pass a component descriptor to override.
API
Slots
Content slots exposed by this component.
- #default
- Full override of the bar content. When present, items prop is ignored.
- #item
- Override for every navigation item. Receives the item descriptor and its index.
- #item.{index}
- Override for a specific item by index (e.g. #item.0 for the first item).
API
Emits
Events emitted by this component.
- @update:modelValueany
- Fired when bar visibility changes. Supports v-model.
- @update:hoverboolean
API
Exposed members
Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.
- <T extends object>(props: T, exclude?: string[]) => Partial<T>
- Utility to forward a filtered subset of props to child components.
- Ref<string>
- Reactive CSS string generated by useStyle from the computed navStyles.
- string
- Unique style-sheet ID for this instance.
- () => void
- Injects the computed style sheet. Called automatically on mount.
- () => void
- Removes the injected style sheet. Called automatically on unmount.
- Ref<boolean>
- True once the style sheet has been injected.
Customisation
CSS variables
CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.
- Bar background color.
- Default foreground color.
- Bar height (density-adjusted at render time).
- Max-width constraint for centered/partial-width bars.
- Default box-shadow. Overridden to elevated variant shadow (upward).
- Density offset applied to height and padding. compact: 8px, comfortable: -8px.
- Top border width. Typically set to separate the bar from page content.
- Transition applied to the bar for smooth show/hide animations.
- Flex justify-content for the content row.
Inclusion
Accessibility
ARIA roles, keyboard navigation and focus management. Sourced from the real component template.
ARIA roles
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Moves focus between navigation buttons. |
| Enter / Space | Activates the focused navigation button. |
Notes
- The root <nav> element has aria-label="Bottom navigation" hardcoded in the template for clear landmark identification.
- The selectedClass prop ("origam-bottom-nav__btn--selected") is applied by the group system but does not automatically set aria-current or aria-selected — consumers should bind aria-current="page" on the active item.
- The v-contrast directive is applied to ensure accessible foreground/background contrast when a custom color is set.
Foundation
Design tokens
Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.
- colorvar(--origam-color__neutral---200)
- Bar background.
- dimensionvar(--origam-space---12)
- Bar height before density adjustment.
- shadow0px -6px 24px 0px rgba(0,0,0,0.05), 0px 0px 0px 1px rgba(0,0,0,0.08)
- Shadow with negative offsetY (projects upward) for elevated variant.
- othercenter
- Content row flex justification.
- dimensionvar(--origam-space---2)
- Compact density offset (+8 px reduction).
Interactive
Playground
Edit props live and see the component update in real time. The generated code snippet updates as you change values.
Rendering the live preview…
Usage
Examples
Ready-to-paste code snippets for your templates.
Basic bottom navigation
Shift mode
Custom item slot