Skip to content
Klarhimmel UI

Tab bar

npx shadcn add https://ui.klarhimmel.com/r/tab-bar.json
DetailsAbout, usage, props and more

An app's main places as a bar at the foot of a phone screen, beside a Sidebar that takes over on wider screens.

Preview

tab-bar.tsx
import { Layers, Library, Sparkles } from 'lucide-react';
import { Theme } from '@/components/klarhimmel/theme/style';
import { TabBar } from '@/components/klarhimmel/ui/tab-bar';

export default function Example() {
  return (
    <Theme theme="brand">
      <TabBar items={[{ href: '/portal', label: 'Assistant', icon: Sparkles, current: true }, { href: '/projects', label: 'Projects', icon: Layers }, { href: '/library', label: 'Library', icon: Library }]} />
    </Theme>
  );
}

Import

Import

import { TabBar } from '@/components/klarhimmel/ui/tab-bar';
Files
tab-bar.tsx, in components/klarhimmel/ui/. With it: theme, utils.
Render in
Render it inside <Theme>, once near the root of your app. Tokens and fonts are scoped to it, so outside it the component is unstyled.

Props

PropTypeDefaultDescription
itemsTabBarItem[]requiredRequired. Three to five places; icon is a component such as a lucide icon.
labelstring'Main'The nav's accessible name.
link(props: { href: string; className: string; children: ReactNode; current?:…plainLinkRenders each tab, for a router's Link; keep className and aria-current.
classNamestring-Extra classes, merged after the component's own.