BottomNav

Navigation
stable

Mobile-first bottom navigation bar with item group selection, grow mode and layout system integration.

Aperçu

Rendu de l’aperçu en cours…

vertical

Rendu de l’aperçu en cours…

horizontal

Rendu de l’aperçu en cours…

shift

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

Anatomy of OrigamBottomNavSchematic of the BottomNav component with 3 numbered internal parts. origam-btn (selected) 1 2 3
Anatomy of <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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

grow
boolean
false
When true, navigation buttons flex-grow to fill the full bar width equally.
mode
'vertical'
Layout mode of the child buttons: "vertical" stacks icon above label, "horizontal" places them side-by-side, "shift" slides label down when inactive.
items
Array<IBtnProps>
[]
Navigation items rendered as Btn-shaped descriptors. Each item can carry icon, text, to/href and active state.
position
'start'
Horizontal placement when the bar does not span full width: "start", "center" or "end".
tag
string
'nav'
HTML element rendered at the root. Defaults to <nav> for correct landmark semantics.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
color
Intent or custom color propagated to all child Btn elements via OrigamDefaultsProvider.
bgColor
Background color of the bar itself.
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
false
Applies a border (typically a top border to separate from page content).
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderColor
string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
elevation
TElevation
Box-shadow elevation token.
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
height
number | string
Override the bar height. Defaults to 48 px (density-adjusted).
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
density
'default'
Propagated to all child Btn elements. Affects bar height via density offset.
Border-radius token or boolean.
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
name
string
'bottom-navigation'
Layout system identifier. Sibling regions use this name to offset their bottom edge by the bar height.
order
string | number
Layout order relative to other layout items (DrawerGroup, AppBar, etc.).
absolute
boolean
false
Positions the bar absolutely rather than as a layout item.
location
TDirectionBoth
disabled
boolean
modelValue
any
true
Controls bar visibility. Drives the slide-in/out transition. Supports v-model.
multiple
boolean
mandatory
boolean
max
number
selectedClass
string
'origam-bottom-nav__btn--selected'
CSS class added to the currently-selected button in the group.
hover
boolean | IStateEffectConfig
hoverClass
string
active
boolean | IStateEffectConfig
activeClass
string
transition
OrigamTranslateBottom
Slide-in/out transition component. Defaults to OrigamTranslateBottom (slides up from the bottom). Pass a component descriptor to override.

API

Slots

Emplacements de contenu exposés par ce composant.

#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

Événements émis par ce composant.

@update:modelValue
any
Fired when bar visibility changes. Supports v-model.
@update:hover
boolean

API

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

<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.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

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

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Rôles ARIA

navigation

Interactions clavier

Interactions clavier
ToucheAction
TabMoves focus between navigation buttons.
Enter / SpaceActivates 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.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

Source
color
var(--origam-color__neutral---200)
Bar background.
dimension
var(--origam-space---12)
Bar height before density adjustment.
shadow
0px -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.
other
center
Content row flex justification.
dimension
var(--origam-space---2)
Compact density offset (+8 px reduction).

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Basic bottom navigation

vue

Shift mode

vue

Custom item slot

vue