AppBar

Layout & Structure
stable

Sticky top-of-page header that integrates with the layout engine. Supports scroll-driven behaviours (hide, collapse, elevate, active) and forwards all Toolbar surface props.

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…

collapse

Structure

Anatomie

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

Anatomy of OrigamAppBarSchematic of the AppBar component with 4 numbered internal parts. 1 prepend 2 #default (title / nav) 3 append 4 #content slot (progress bar, custom content) origam-app-bar (header)
Anatomy of <origam-app-bar> — 4 zones: prepend ①, default content ②, append ③, and the optional content slot ④ below the main bar.
1.origam-bar__img / #prepend
Prepend area. Hosts navigation icon, logo, or optional background image via #img slot.
2#default
Main content area forwarded to OrigamToolbar. Typically holds title text and spacers.
3#append
Trailing zone. Action icons, account avatar, search trigger.
4#content
Optional full-width content slot rendered below the bar row (e.g. a progress indicator).

API

Props

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

location
'top'
Edge the bar is docked to. Only top/bottom are handled by the layout engine.
image
IImgProps
Background image rendered inside the prepend slot via OrigamImg. Fades away when scrollBehavior includes "fade-image".
top
number | string
bottom
number | string
left
number | string
right
number | string
active
boolean | IStateEffectConfig
Forwarded to the inner Toolbar. When an object with surface props, they are applied once the page is scrolled (active scroll-behaviour only).
style
string | Array<string> | object | StyleValue
title
string
flat
boolean
false
Removes the box-shadow. Activated automatically by elevate scroll-behaviour while at the top.
id
string
class
string | Array<string> | object
height
number | string
56
Bar height. Drives the layout reservation so sibling regions offset correctly.
position
TPosition
maxHeight
number | string
minHeight
number | string
color
TColor
bgColor
TColor
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
borderColor
string
rounded
boolean | number | string | TRounded | null | undefined
elevation
TElevation
padding
boolean | number | string
margin
boolean | number | string
collapse
boolean
false
Forces collapsed state (forwarded to OrigamToolbar).
modelValue
boolean
true
Controls bar visibility. Set false to hide. Driven by hide scroll-behaviour automatically.
fontSize
TFontSize
fontWeight
TFontWeight
lineHeight
TLineHeight
letterSpacing
TLetterSpacing
tag
string
'header'
Root HTML element. Defaults to <header> for correct landmark semantics.
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
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
borderTop
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
hover
boolean | IStateEffectConfig
density
TDensity
activeClass
string
hoverClass
string
name
string
Layout item id. Required when multiple layout items share the same edge to control stacking order.
order
string | number
0
Layout stacking order. Lower values register first and reserve space first.
scrollBehavior
TScrollBehavior | TAnyString
Space-separated behaviour tokens: hide, inverted, collapse, elevate, active, fade-image.
scrollTarget
string
scrollThreshold
string | number
300
Pixel distance from top before scroll behaviours engage.

API

Slots

Emplacements de contenu exposés par ce composant.

#append
Trailing area — action icons, account avatar, search trigger.
#prepend
Leading area — navigation icon, back button or brand logo.
#img
Replaces the default OrigamImg background. Only rendered when the image prop is set or this slot is used.
#title
#content
Full-width content override — bypasses the inner Toolbar layout (useful for a custom progress bar below the bar).
#default
Main toolbar content area (title, nav items, spacer…).

API

Emits

Événements émis par ce composant.

@update:modelValue
any

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>
Forwards a filtered subset of props to a child (e.g. the inner OrigamToolbar).
Ref<string>
Reactive CSS string from useStyle.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet into the document.
() => void
Removes the injected style sheet.
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.

Bar background. Resolves to the raised surface token.
Bar foreground text and icon color.
Default bar height as defined in the token file. The height prop overrides this at runtime.
Bar elevation. Removed when flat=true or elevate scroll-behaviour is at top.
Stacking context z-index. Keeps the bar above page content.
Duration of hide/show and elevation transitions.

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 elements inside the bar (prepend icons, title link, append icons).

Notes

  • Default tag is <header>, which has the implicit role="banner" at document level. Provides the primary page navigation landmark.
  • All scroll-behaviour transitions (hide/show, collapse) respect prefers-reduced-motion: reduce.

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---raised)
Default bar background.
dimension
64px
Default bar height registered with the layout engine.
shadow
var(--origam-shadow---sm)
Resting elevation.
number
var(--origam-zIndex---fixed)
Z-index above page content.
duration
var(--origam-motion__duration---medium)
Duration of scroll-driven animations.

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 app bar

vue

Scroll behaviours

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.