Skip to content
Klarhimmel UI

Navbar, tabbar

Navbar, tabbar previewNavbar, tabbar preview

Install

npx shadcn add @klarhimmel/navbar-tabbar
DetailsAbout, usage, props and more

A row of three to five equally spaced tabs, each an icon above a short label, as native links with the current one marked and filled.

Import

Import

import Block from '@/components/klarhimmel/blocks/navbar-tabbar';
Also called
  • navigation/tabbar
About
A row of three to five equally spaced tabs, each an icon above a short label, as native links with the current one marked and filled. It is drawn in the section, a bar with a top rule, never fixed to the screen.
Category
The bar at the top of every page: brand, links, one action. New project? Set it up once: /get-started/installation.

Notes

When to use it

Pick it for an app-style row of three to five destinations, each an icon above a short label, with the current one filled. For a header with a brand and links use navbar-simple; for an icon column beside the page use app-sidebar-rail.

Writing for it

- Three to five tabs. A label holds 20 characters, so name the place in one word or two. - Each icon is chosen by name from the shared set; mark exactly one tab current. - The navigation name holds 40 characters and is read aloud, never drawn.

Watch out for

The bar sits in the page flow, not fixed to the screen, so place it last in an app screen. A sixth tab or a long label squeezes the others, so cut a tab instead.

Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import NavbarTabbar from '@/components/klarhimmel/blocks/navbar-tabbar';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <NavbarTabbar props={{
          "label": "Name this navigation",
          "tabs": [
            {
              "label": "First tab",
              "icon": "compass",
              "href": "#first",
              "current": true
            },
            {
              "label": "Second tab",
              "icon": "search",
              "href": "#second",
              "current": false
            },
            {
              "label": "Third tab",
              "icon": "sparkles",
              "href": "#third",
              "current": false
            },
            {
              "label": "Fourth tab",
              "icon": "users",
              "href": "#fourth",
              "current": false
            }
          ]
        }} />
      </BlockSurface>
    </Theme>
  );
}

Props

The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.

PropTypeDefaultDescription
labelstring'Name this navigation'Text, up to 40 characters.
tabs{ label, icon, href, current }[]4 itemsList of 3 to 5. Each item: label, icon ('zap' | 'shield' | 'layers' | 'globe' | 'sparkles' | 'clock' | 'code' | 'palette' | 'lock' | 'chart' | 'users' | 'mail' | 'heart' | 'rocket' | 'search' | 'settings' | 'check' | 'star' | 'book' | 'box' | 'cloud' | 'compass' | 'leaf' | 'gauge'), href, current.