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.
Preview
Rendering the live preview…
defaultRendering the live preview…
flatRendering the live preview…
collapseStructure
Anatomy
Visual breakdown of the component's internal structure with BEM class call-outs.
<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
All props accepted by this component, with their type, default value and 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
Content slots exposed by this component.
- #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
Events emitted by this component.
- @update:modelValueany
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>
- 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.
Customisation
CSS variables
CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.
- 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
Accessibility
ARIA roles, keyboard navigation and focus management. Sourced from the real component template.
ARIA roles
Keyboard interactions
| Key | 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.
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__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.
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 app bar
Scroll behaviours
Ecosystem
Family
Components from the same folder that share conventions and often compose together.