Takeoff Header
ASecurity`Header` is the top app bar: a `<header>` banner landmark holding the brand, the main navigation, a search field and icon actions. Behavior — the navigation menu's open state, `aria-current`, `aria-expanded` and Escape — is Spar's `Header`; the look follows the Takeoff design. **When to use:** the app's top bar: brand, main navigation links, search, icon actions and the user menu, with a collapsing menu on narrow screens. Not this — in-page section switching is `Tabs`; a location trail is `Br...
- 3 stars
- 0 votes
- 0 copies
- 1 view
- Added December 4, 2026
Security analysis
100/100Pro scans all 2 files and shows the line behind each finding
npx -y skills add turkishtechnology/takeoff-v2 --skill takeoff-header --agent claude-codeAre you the author of Takeoff Header?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/turkishtechnology-takeoff-header)---
name: takeoff-header
description:
'Build a Header (the top app bar / navbar: brand, main navigation links,
search, icon actions and a user menu, with a navigation menu that collapses
behind a hamburger on narrow screens) — the Header from @takeoff-ui/react-spar
(Takeoff UI / Spar React). Trigger when adding a top bar, navbar, app bar or
site header, marking the current page link, adding notification / settings /
language actions, an avatar user menu, or a mobile hamburger menu. Use this
skill WHENEVER building, adding, importing, styling, or fixing a Header in a
React app that uses @takeoff-ui/react-spar / Takeoff / Spar. Not for a page
title block or a card header — use Card.Header / Dialog.Header there.'
---
# Header — @takeoff-ui/react-spar
`Header` is the top app bar: a `<header>` banner landmark holding the brand, the
main navigation, a search field and icon actions. Behavior — the navigation
menu's open state, `aria-current`, `aria-expanded` and Escape — is Spar's
`Header`; the look follows the Takeoff design.
**When to use:** the app's top bar: brand, main navigation links, search, icon
actions and the user menu, with a collapsing menu on narrow screens. Not this —
in-page section switching is `Tabs`; a location trail is `Breadcrumb`.
## Setup
Requires the Takeoff provider + token CSS mounted once at the app root (see the
`takeoff-ui` skill or the installation docs). Then import:
```tsx
import { Header } from '@takeoff-ui/react-spar';
```
## Compound parts
- `Header` — root `<header>`. Holds `size`, `type`, `sticky` and the menu's
`open` / `defaultOpen` / `onOpenChange`.
- `Header.Bar` — the main row. `Header.TopBar` — optional dark utility row above
it. `Header.SubBar` — optional light row under it.
- `Header.Brand` — logo / product name (`as="a" href="/"` for a home link).
- `Header.Nav` — `<nav>` named "Main" by default; `variant` `basic` | `pill`.
- `Header.NavLink` — a link (`as={Link}` for a router); `active` sets
`aria-current="page"`; `startContent` / `endContent` for icons.
- `Header.Actions` — end-aligned group for search, actions and the avatar.
- `Header.Action` — icon button; `indicator` dot, `rounded`, `variant`
(`primary` | `info`, its open colour). Use it as a `Dropdown.Trigger` /
`Popover.Trigger` via `as`.
- `Header.MenuToggle` — hamburger named "Menu"; shown only while the nav is
collapsed (below 1248px of header width).
## Basic usage
```tsx
<Header sticky>
<Header.Bar>
<Header.MenuToggle />
<Header.Brand as="a" href="/">
<Logo />
</Header.Brand>
<Header.Nav>
<Header.NavLink href="/flights" active>
Flights
</Header.NavLink>
<Header.NavLink href="/bookings">Bookings</Header.NavLink>
</Header.Nav>
<Header.Actions>
<Header.Action aria-label="Notifications, 3 unread" indicator>
<NotificationIconOutlinedRounded />
</Header.Action>
</Header.Actions>
</Header.Bar>
</Header>
```
## Examples
### Search and an avatar user menu
```tsx
<Header.Actions>
<Input size="small">
<Input.Field placeholder="Search" aria-label="Search" />
<Input.TrailingIcon>
<SearchIconOutlinedRounded />
</Input.TrailingIcon>
</Input>
<Divider orientation="vertical" />
<Dropdown>
<Dropdown.Trigger as={Header.Action} aria-label="Account" rounded>
<Avatar name="Ada Lovelace" size="small" rounded>
<Avatar.Fallback>AL</Avatar.Fallback>
</Avatar>
</Dropdown.Trigger>
<Dropdown.Content align="end">
<Dropdown.Item>Sign out</Dropdown.Item>
</Dropdown.Content>
</Dropdown>
</Header.Actions>
```
### Centred search with the links in a sub bar
```tsx
<Header type="distributed">
<Header.Bar>
<Header.Brand>…</Header.Brand>
<Input size="small">…</Input>
<Header.Actions>…</Header.Actions>
</Header.Bar>
<Header.SubBar>
<Header.Nav variant="pill" aria-label="Sections">
<Header.NavLink href="/" active>
Overview
</Header.NavLink>
</Header.Nav>
</Header.SubBar>
</Header>
```
### Router links, toggle driving a sidebar
```tsx
<Header open={sidebarOpen} onOpenChange={setSidebarOpen}>
<Header.Bar>
<Header.MenuToggle aria-controls="app-sidebar" />
<Header.Nav>
<Header.NavLink
as={NavLink}
to="/flights"
active={pathname === '/flights'}
>
Flights
</Header.NavLink>
</Header.Nav>
</Header.Bar>
</Header>
```
## Key props
### `Header` (root)
| Prop | Type | Default | Notes |
| -------------- | ------------------------------ | --------- | ------------------------------------------------ |
| `size` | `'small' \| 'base' \| 'large'` | `'base'` | Bar height 56 / 64 / 72px, link and action size. |
| `type` | `'basic' \| 'distributed'` | `'basic'` | `distributed` centres the bar's middle child. |
| `sticky` | `boolean` | `false` | `position: sticky` at the top. |
| `open` | `boolean` | - | Controlled navigation-menu state. |
| `defaultOpen` | `boolean` | `false` | Uncontrolled initial state. |
| `onOpenChange` | `(open: boolean) => void` | - | Toggle, Escape, or a link pressed while open. |
### Parts
| Part | Prop | Notes |
| ------------------- | ----------------------------- | ---------------------------------------------------- |
| `Header.Nav` | `variant`, `aria-label` | `basic` underline / `pill`; name each nav. |
| `Header.NavLink` | `active`, `start/endContent` | `aria-current="page"`; icons are `aria-hidden`. |
| `Header.Action` | `indicator`, `rounded` | Icon-only: always pass `aria-label`. |
| `Header.MenuToggle` | `aria-label`, `aria-controls` | Default name "Menu"; children may be `({ isOpen })`. |
Full props, events, data attributes & type definitions: see
`references/full-docs.md`.
## Accessibility
- The root is the page's banner landmark (outside `article`/`aside`/`main`/
`nav`/`section`). Each `Header.Nav` is a navigation landmark: give each its
own `aria-label` when there is more than one.
- `Escape` inside the header closes the open menu and refocuses the toggle;
Escape inside a dropdown opened from the header closes only that dropdown.
- Say what an `indicator` dot means in the action's `aria-label`.
## Reference
- Full component docs (Copy page): `references/full-docs.md`
- Live docs: https://v2.takeoffui.com/docs/components/header
- Source: `packages/react-spar/src/components/header/`
- Spar primitive: https://v2.takeoffui.com/headless/docs/Components/Header
Files in this skill
- SKILL.md
- references/full-docs.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.