Toolbar

Layout & Structure
stable

Horizontal bar hosting a title, prepend/append action zones and content. Supports collapse, flat and floating modes with density and elevation control.

Aperçu

Rendu de l’aperçu en cours…

default

Rendu de l’aperçu en cours…

flat

Rendu de l’aperçu en cours…

primary

Rendu de l’aperçu en cours…

compact

Rendu de l’aperçu en cours…

rounded

Structure

Anatomie

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

Anatomy of OrigamToolbarSchematic of the Toolbar component with 6 numbered internal parts. prepend title content append 1 2 3 4 5 origam-toolbar
Anatomy of <origam-toolbar> — 5 internal parts. The __wrapper arranges prepend, title, content and append in a row; the optional shadow line ① marks the bottom edge.
1.origam-toolbar
Root element. Renders as <header> by default. Hosts the box-shadow and z-index.
2.origam-toolbar__prepend
Leading zone. Rendered only when the #prepend slot has content. Margin-end: auto pushes the title to the right.
3.origam-toolbar__title
Title zone. Contains an OrigamTitle by default, or the #title slot.
4.origam-toolbar__content
Flexible center area. flex-grow: 1 so it absorbs all remaining space.
5.origam-toolbar__append
Trailing zone. Rendered only when the #append slot has content. Margin-start: auto pushes it to the far right.

API

Props

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

collapse
boolean
false
Collapses the toolbar to a compact pill shape (max-width: 112px) with rounded end. Useful for scrollable-aware app-bar patterns.
flat
boolean
false
Removes the box-shadow. Use when the toolbar sits on a surface that already provides visual separation.
floating
boolean
false
Switches layout to inline-flex so the toolbar shrinks to its content width instead of spanning the full row.
title
string
Toolbar title rendered inside the title slot as an OrigamTitle. Can also be overridden via the #title slot.
modelValue
boolean
v-model binding for the active / visible state. When false, the toolbar is hidden (e.g. collapsed app-bar on scroll).
tag
string
'header'
Root HTML element. Defaults to header for semantic page structure.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
false
Applies a border. Switches box-shadow to none in border-variant mode.
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
Border-radius token or boolean. true uses the theme default radius.
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
elevation
TElevation
Box-shadow elevation token. Use 0 to remove the default shadow without flat prop.
density
'default'
Adjusts height: default=56px, compact=40px, prominent=80px.
color
Foreground (text/icon) color. Accepts a semantic intent or custom CSS color.
bgColor
Background color. Overrides the default surface background.
padding
boolean | number | string
Inner padding shorthand. Accepts spacing token or CSS value.
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
margin
boolean | number | string
Outer margin shorthand.
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
position
CSS position strategy: static, fixed, sticky, absolute, relative.
top
number | string
bottom
number | string
left
number | string
right
number | string
height
number | string
Overrides the toolbar height (default driven by density token).
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
Overrides the toolbar width. Default is 100%.
active
boolean | IStateEffectConfig
false
Forces the active visual state on the toolbar.
activeClass
string
hover
boolean | IStateEffectConfig
hoverClass
string
fontSize
TFontSize
fontWeight
TFontWeight
lineHeight
TLineHeight
letterSpacing
TLetterSpacing

API

Slots

Emplacements de contenu exposés par ce composant.

#default
Full content override. When used, the internal wrapper (prepend/title/content/append) is replaced entirely.
#prepend
Leading zone (left on LTR). Typically holds a nav icon or back button. Rendered only when the slot has content.
#title
Title zone. Falls back to rendering an OrigamTitle with the title prop when the slot is empty.
#content
Flexible center zone. Grows to fill the available space between prepend/title and append.
#append
Trailing zone (right on LTR). Typically holds action buttons or an overflow menu.

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 for the computed toolbar styles (used by DefaultsProvider).
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 into the DOM.

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.

Toolbar background color.
Foreground (text/icon) color.
Default height (56px). Overridden per density variant.
Height in density="compact" mode (40px).
Height in density="prominent" mode (80px).
Box shadow. Set to none via the flat prop.
Transition duration for height, transform, and box-shadow.
Z-index of the toolbar when position is fixed or sticky.

Inclusion

Accessibilité

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

Rôles ARIA

banner

Interactions clavier

Interactions clavier
ToucheAction
TabMoves focus through interactive children (buttons, links) in the toolbar.

Notes

  • When rendered as <header> (default tag), the toolbar acts as a ARIA banner landmark. Ensure only one banner per page.
  • Icon-only buttons inside the toolbar must carry an aria-label.

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__surface---default)
Default toolbar background.
dimension
var(--origam-toolbar---height-default, var(--origam-space---14))
Default height (56px).
dimension
var(--origam-space---10)
Compact density height.
shadow
var(--origam-shadow---sm)
Default shadow.
duration
var(--origam-motion__duration---medium)
Height/shadow transition duration.

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 toolbar

vue

Colored & elevated

vue

Flat & floating

vue