AppHeader
Glass top bar: brand, primary nav, then any right-side children (search, bell, account).
Code
import * as React from 'react';
import { AppHeader, Avatar, IconButton, SearchField } from '@fruit-labs/design';
export default function Demo() {
return (
<div
style={{
padding: 12,
background: 'var(--bg)',
borderRadius: 20,
}}
>
<AppHeader
brand="Orchard"
logo={
<span
style={{
width: 28,
height: 28,
borderRadius: 8,
background: 'var(--tile-blueberry)',
}}
/>
}
links={[
{
label: 'Projects',
active: true,
},
{
label: 'Reports',
},
{
label: 'Team',
},
]}
>
<SearchField
placeholder="Search…"
style={{
width: 220,
maxWidth: '100%',
}}
/>
<IconButton icon="bell" label="Notifications" variant="plain" size="sm" />
<Avatar name="Ada Lovelace" size={32} />
</AppHeader>
</div>
);
}Install
From npm:
npm install @fruit-labs/design
import { AppHeader } from '@fruit-labs/design';Or copy the TypeScript source into your project:
npx shadcn@latest add https://design.fruitlabs.online/r/app-header.jsonGuidelines
- Sticky with 12px inset by default;
flatfor a full-bleed bar.
Props
| Prop | Type | Required |
|---|---|---|
brand | React.ReactNode | No |
logo | React.ReactNode | No |
brandHref | string | No |
links | Array<{ label: React.ReactNode; href?: string; active?: boolean; onClick?: () => void }> | No |
flat | boolean | No |
className | string | No |
children | React.ReactNode | No |