App Header
The top bar for a detail screen, extracted from the mockup’s .appbar, .back and .crumb.
Interactive Preview
Section titled “Interactive Preview”Account Settings
Account Settings
import { AppHeader, BackButton, HeaderTitle, Breadcrumb } from "@/components/ui/app-header";
export default function Page() { return ( <AppHeader> <BackButton aria-label="Go back" onClick={() => history.back()} /> <div> <Breadcrumb>Home / <b>Account Settings</b></Breadcrumb> <HeaderTitle>Account Settings</HeaderTitle> </div> </AppHeader> );}<script lang="ts"> import AppHeader from "@/components/ui/app-header.svelte"; import BackButton from "@/components/ui/back-button.svelte"; import Breadcrumb from "@/components/ui/breadcrumb.svelte"; import HeaderTitle from "@/components/ui/header-title.svelte";</script>
<AppHeader> <BackButton aria-label="Go back" onclick={() => history.back()} /> <div> <Breadcrumb>Home / <b>Account Settings</b></Breadcrumb> <HeaderTitle>Account Settings</HeaderTitle> </div></AppHeader>import { AppHeader, BackButton, HeaderTitle, Breadcrumb } from "@/components/ui/app-header";
export default function Page() { return ( <AppHeader> <BackButton aria-label="Go back" onClick={() => history.back()} /> <div> <Breadcrumb>Home / <b>Account Settings</b></Breadcrumb> <HeaderTitle>Account Settings</HeaderTitle> </div> </AppHeader> );}Installation
Section titled “Installation”npx @glaceon/cli add app-header --framework react # or svelte, solidNo headless dependency, only the design tokens:
bun add @glaceon/tokensReact and Solid export all four parts from one module. Svelte needs one import per part (AppHeader.svelte, BackButton.svelte, Breadcrumb.svelte, HeaderTitle.svelte).
API Reference (Props)
Section titled “API Reference (Props)”| Component | Prop | Type | Default | Description |
|---|---|---|---|---|
AppHeader |
class |
string |
undefined |
Wrapper classes. Renders a <header>. |
BackButton |
label |
string |
"Kembali" |
Accessible name. The glyph alone does not say where it goes, so this is required for a useful announcement. |
BackButton |
onClick |
function |
undefined |
Wire this to your router; the button does nothing on its own. |
Breadcrumb |
class |
string |
undefined |
Extra classes. |
HeaderTitle |
class |
string |
undefined |
Extra classes. Renders an <h2>. |
Accessibility
Section titled “Accessibility”The back button is 28px, matching the mockup. That is below the 44px tap target the rest of this system holds to, and it is the one place I kept the mockup’s size: it sits in a dense header toolbar where 44px would dominate the bar. If you want strict compliance, pass class="size-11". The button also carries an aria-label, because ‹ announces as nothing useful, and it is wired to nothing by default, so you must supply onClick for it to act.