Sidebar: Under a header
The sidebar is sticky, so it starts below anything above it. With a sticky header, set --sidebar-top to its height and the sidebar pins below it and fits the rest of the screen.
This adds the example as components/examples/sidebar/header.tsx, together with the Sidebar component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/sidebar-header.jsonTo add only the component, follow the Sidebar installation.
See them all, with keyboard support and accessibility notes, on the Sidebar page.
- ButtonButtons in every variant and size, with a built-in loading, success and error flow that skips the spinner for fast requests.
- CollapsibleA panel that shows and hides with height motion you can reverse mid-way, without jumping the layout.
- Dropdown menuA menu of actions and options behind a button, with groups, submenus, checkbox and radio items, and shortcuts.
- HotkeyParse, label, announce and match keyboard shortcuts, with ⌘ on Apple platforms and Ctrl everywhere else.
- InputA text input with three sizes, invalid and read-only states, native validation styling and a 16px touch font so phones never zoom in.
- Number flowAnimated numbers where only the changed digits spin, with any Intl format and locale.