Skip to content
Klarhimmel UI

Navbar, corners

Navbar, corners previewNavbar, corners preview

Install

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

Brand top-left and links top-right above a wide picture, with the call to action bottom-left and a menu icon link bottom-right laid over the picture.

Import

Import

import Block from '@/components/klarhimmel/blocks/navbar-corners';
Also called
  • navigation/corners
  • header/corners
About
Brand top-left and links top-right above a wide picture, with the call to action bottom-left and a menu icon link bottom-right laid over the picture. On a phone the picture is taller and the row above wraps.
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 a landing page that opens on a picture with the brand and links above it, the main action in the picture's lower left and a menu link in its lower right. Pick navbar-simple for a plain bar with no picture, or navbar-overlay-menu when the menu should open over the page.

Writing for it

- Brand up to 40 characters, up to 6 links of 40 characters each. - Main action label up to 40 characters; menu label is read by screen readers only. - The picture needs a real image; the corner controls sit on it.

Watch out for

A busy or dark picture hides the white menu circle and the action. Pick a calm image, and point the menu link at a real page, because it is a link and opens nothing by itself.

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 NavbarCorners from '@/components/klarhimmel/blocks/navbar-corners';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <NavbarCorners props={{
          "brand": "Brand name",
          "links": [
            {
              "label": "First page",
              "href": "#first"
            },
            {
              "label": "Second page",
              "href": "#second"
            },
            {
              "label": "Third page",
              "href": "#third"
            }
          ],
          "media": {
            "src": "/pictures/photo-factory2.avif",
            "alt": "A production line in a large industrial hall"
          },
          "cta": {
            "label": "Main action",
            "href": "#start"
          },
          "menu": {
            "label": "Open the menu",
            "href": "#menu"
          }
        }} />
      </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
brandstring'Brand name'Text, up to 40 characters.
linksLink[]3 itemsList of up to 6.
mediaMedia{…}See the type.
ctaLink{…}See the type.
menuLink{…}See the type.