DocsComponentsTemplatesThemesGitHub

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.json

Guidelines

  • Sticky with 12px inset by default; flat for a full-bleed bar.

Props

PropTypeRequired
brandReact.ReactNodeNo
logoReact.ReactNodeNo
brandHrefstringNo
linksArray<{ label: React.ReactNode; href?: string; active?: boolean; onClick?: () => void }>No
flatbooleanNo
classNamestringNo
childrenReact.ReactNodeNo

Edit this example on GitHub