App Header Edge
The client half of `AppHeader`. It marks the header `data-scrolled` once the page has moved off its top, so the bar gains its surface and border only when content passes beneath it. With a large title it also marks the header `data-collapsed` once that…
Preview
Rendered from the story the storybook (a11y) CI gate runs axe against — the preview can't show something that hasn't been verified.
Install
Two equivalent paths — the URL works in any shadcn-CLI setup; the alias works once you've registered @interlace in your components.json.
npx shadcn@latest add https://ds.interlace.tools/r/app-header-edge.jsonnpx shadcn@latest add @interlace/app-header-edgeHistory
This component is at v1.0.0, first shipped in @interlace/ui 2.0.0. The version is stamped as a banner into the file the install writes, so the copy in your tree says which one you have — compare it with the number above before deciding whether to re-run the install.
@interlace/ui 2.0.01 entry
- Addedminor
A mobile app shell.
AppShellis the frame: a column at least100dvhtall with a sticky header, a<main>(the SkipLink target) and a sticky tab bar, nothing fixed-position, so the last line of content always clears the bar and an on-screen keyboard never drags a bar into the page.TabBarholds three to five links with an icon and a word; the current one (currentHref, which keeps a parent tab current on its child pages) getsaria-current="page", a filled pill that grows in from the middle and a heavier label, and a tab can carry a count or a dot with words for assistive tech.hideFromhides it where a Topbar takes over.AppHeaderis the view's bar: back, title and actions, sticky, clear of the notch, with its surface only once content scrolls under it;largeTitlesets the title big and moves it into the bar on scroll, read once.AppHeaderBackis the back link, its arrow mirrored in RTL. Every part pads itself byenv(safe-area-inset-*)for a page added to a home screen (viewport-fit=cover). Under reduced motion the pill, surface and title simply change.
Import
Single named export.
import { AppHeaderEdge } from '@/components/ui/patterns/app-header-edge';API reference
Parsed from the type declarations in the source — the same file the install writes into your tree, so this table can't drift from the component you get.
AppHeaderEdgeProps
| Prop | Type | Description |
|---|---|---|
| threshold | number | Pixels of scroll before the header counts as scrolled. @default 4 |
Accessibility
Every story for this component is rendered headlessly and checked with axe-core (wcag2aa, wcag22aa, best-practice, ACT) on every PR. That gate has no continue-on-error, so what ships has zero known violations.
What follows is what static analysis can see. Axe cannot press a key and never sees an overlay open, so the operable-without-a-mouse claim lives in Behavior instead, where the keyboard path is replayed step by step.
- Focus + keyboard behaviour
- Native element semantics — no interaction layer to get wrong.
- Focus ring (WCAG 2.2 SC 2.4.13)
- Not focusable — no focus indicator required.
- Reduced motion
- No animation to gate.
- ARIA in the source
- None — semantics come from the element or the Base UI primitive rather than hand-written ARIA.
R-rule compliance
Every primitive in @interlace/ui models to the portable 26-rule floor enforced by the componentApi ESLint preset. The cells below pin exactly where each rule applies in this file.
| Rule | Concept | Where |
|---|---|---|
| R6 | data-slot | `app-header-edge` |
| R25 | Client component | one passive scroll listener on window |
Dependencies
- Base UI primitive
- Native / no Base UI dependency
- Lucide icons
- none
- NPM dependencies
- none
- Registry dependencies
Source
The full implementation — components/ui/patterns/app-header-edge.tsx once installed.
'use client';
import * as React from 'react';
// @interlace/app-header-edge v1.0.0 — Interlace design system.
// Docs, props and live preview: https://ds.interlace.tools/c/app-header-edge
// What changed since: https://ds.interlace.tools/c/app-header-edge#history
// Generated banner — keep it, the upgrade diff reads this version.
/**
* @interlace/ui — AppHeaderEdge
*
* The client half of `AppHeader`. It marks the header `data-scrolled` once
* the page has moved off its top, so the bar gains its surface and border
* only when content passes beneath it. With a large title it also marks the
* header `data-collapsed` once that title has scrolled up under the bar, so
* the small title in the bar can take over. AppHeader renders it for you;
* it draws nothing itself.
*
* | Rule | Concept | Where in this file |
…39 more lines…Registry JSON
The raw registry record — what the shadcn CLI fetches.