AppBar
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…
defaultRendu de l’aperçu en cours…
flatRendu de l’aperçu en cours…
collapseStructure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<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.
- Edge the bar is docked to. Only top/bottom are handled by the layout engine.
- imageIImgProps
- Background image rendered inside the prepend slot via OrigamImg. Fades away when scrollBehavior includes "fade-image".
- topnumber | string
- bottomnumber | string
- leftnumber | string
- rightnumber | string
- activeboolean | IStateEffectConfig
- Forwarded to the inner Toolbar. When an object with surface props, they are applied once the page is scrolled (active scroll-behaviour only).
- stylestring | Array<string> | object | StyleValue
- titlestring
- flatbooleanfalse
- Removes the box-shadow. Activated automatically by elevate scroll-behaviour while at the top.
- idstring
- classstring | Array<string> | object
- heightnumber | string56
- Bar height. Drives the layout reservation so sibling regions offset correctly.
- positionTPosition
- maxHeightnumber | string
- minHeightnumber | string
- colorTColor
- bgColorTColor
- borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>
- borderColorstring
- roundedboolean | number | string | TRounded | null | undefined
- elevationTElevation
- paddingboolean | number | string
- marginboolean | number | string
- collapsebooleanfalse
- Forces collapsed state (forwarded to OrigamToolbar).
- modelValuebooleantrue
- Controls bar visibility. Set false to hide. Driven by hide scroll-behaviour automatically.
- fontSizeTFontSize
- fontWeightTFontWeight
- lineHeightTLineHeight
- letterSpacingTLetterSpacing
- tagstring'header'
- Root HTML element. Defaults to <header> for correct landmark semantics.
- 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
- 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
- borderTopboolean | number | string
- borderInlineStartboolean | number | string
- borderInlineEndboolean | number | string
- borderInlineStartColorTColor
- borderInlineEndColorTColor
- borderLeftboolean | number | string
- borderBottomboolean | number | string
- borderRightboolean | number | string
- borderBlockboolean | number | string
- borderInlineboolean | number | string
- borderBlockStartboolean | number | string
- borderBlockEndboolean | number | string
- borderStylestring
- borderTopColorTColor
- borderRightColorTColor
- borderBottomColorTColor
- borderLeftColorTColor
- borderBlockStartColorTColor
- borderBlockEndColorTColor
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | number | string
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- hoverboolean | IStateEffectConfig
- densityTDensity
- activeClassstring
- hoverClassstring
- namestring
- Layout item id. Required when multiple layout items share the same edge to control stacking order.
- orderstring | number0
- Layout stacking order. Lower values register first and reserve space first.
- scrollBehaviorTScrollBehavior | TAnyString
- Space-separated behaviour tokens: hide, inverted, collapse, elevate, active, fade-image.
- scrollTargetstring
- scrollThresholdstring | number300
- 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:modelValueany
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
Interactions clavier
| Touche | Action |
|---|---|
| Tab | Moves 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.
- colorvar(--origam-color__surface---raised)
- Default bar background.
- dimension64px
- Default bar height registered with the layout engine.
- shadowvar(--origam-shadow---sm)
- Resting elevation.
- numbervar(--origam-zIndex---fixed)
- Z-index above page content.
- durationvar(--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
Scroll behaviours
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.