{
  "$schema": "https://design.senvenli.com/schema/component.full.json",
  "kind": "component",
  "family": "navigation",
  "status": "alpha",
  "import": "@senvenli/react/navigation",
  "name": "navbar",
  "title": "Navbar",
  "exports": [
    "Navbar",
    "NavbarBrand",
    "NavbarItem",
    "NavbarActions"
  ],
  "description": "The top bar of a public site: brand, up to five links, actions and a language choice, collapsing into a menu on phones.",
  "keywords": [
    "compound",
    "header",
    "menu",
    "navbar",
    "navbar item",
    "navigation",
    "top bar"
  ],
  "usage": {
    "when": [
      "The main navigation of a marketing or public site."
    ],
    "instead": [
      {
        "use": "sidebar",
        "when": "An app with many sections."
      }
    ]
  },
  "a11y": {
    "builtIn": [
      "A navigation landmark named \"Main menu\".",
      "The brand link is named for the home page."
    ],
    "youProvide": [
      "A `brandLabel` when the brand alone does not say where it goes.",
      "With children: an id on every NavbarItem (currentKey matches it), or isCurrent on the page's link."
    ]
  },
  "related": [
    "sidebar"
  ],
  "genui": {
    "expose": false
  },
  "source": [
    "src/navigation/navbar.tsx"
  ],
  "props": {
    "Navbar": [
      {
        "name": "brand",
        "type": "React.ReactNode",
        "required": false,
        "origin": "own",
        "description": "The logo and wordmark (the site's logo). It links to `brandHref`. Or a `NavbarBrand` child."
      },
      {
        "name": "brandHref",
        "type": "string",
        "required": false,
        "origin": "own",
        "default": "\"/\"",
        "description": "Where the brand goes: the home page.",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "brandLabel",
        "type": "string",
        "required": false,
        "origin": "own",
        "description": "The brand link's name when the brand alone does not say where it goes (\"Acme home\").",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "links",
        "type": "readonly NavbarLink[]",
        "required": false,
        "origin": "own",
        "description": "Up to five destinations. Leave it out to compose `NavbarItem`s as children instead.",
        "schema": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "href": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "label",
              "href"
            ]
          }
        }
      },
      {
        "name": "children",
        "type": "React.ReactNode",
        "required": false,
        "origin": "own",
        "description": "With no `links`: `NavbarItem`s (the destinations), plus an optional `NavbarBrand` (instead of `brand`) and\n`NavbarActions` (instead of `actions`)."
      },
      {
        "name": "currentKey",
        "type": "string",
        "required": false,
        "origin": "own",
        "description": "The link of the page (or section) in view: marked `aria-current=\"page\"`.",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "actions",
        "type": "React.ReactNode",
        "required": false,
        "origin": "own",
        "description": "At the end: a language switcher, sign-in (subtle), then the one primary action, the same on every page. On\nphones they move into the menu panel, under the links. Or a `NavbarActions` child."
      },
      {
        "name": "isSticky",
        "type": "boolean",
        "required": false,
        "origin": "own",
        "description": "Pinned to the top while the page scrolls.",
        "schema": {
          "type": "boolean"
        }
      },
      {
        "name": "maxWidth",
        "type": "string | number",
        "required": false,
        "origin": "own",
        "description": "The width of the bar's content (\"1280px\", 1280), centred, so the brand and the actions line up with the page's\nown container; the bar's background and border still run the full width. Left out, the content spans it.",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "density",
        "type": "Density",
        "required": false,
        "origin": "own",
        "default": "\"comfortable\"",
        "description": "`compact`: 48px instead of 56px, the bar after the hero.",
        "schema": {
          "type": "string",
          "enum": [
            "comfortable",
            "compact"
          ]
        }
      },
      {
        "name": "aria-label",
        "type": "string",
        "required": false,
        "origin": "own",
        "description": "Names the navigation landmark; \"Main menu\" by default.",
        "schema": {
          "type": "string"
        }
      }
    ],
    "NavbarBrand": [
      {
        "name": "children",
        "type": "React.ReactNode",
        "required": true,
        "origin": "own",
        "description": "The logo and wordmark; it links to the Navbar's `brandHref`."
      }
    ],
    "NavbarItem": [
      {
        "name": "id",
        "type": "string",
        "required": true,
        "origin": "own",
        "description": "Matches the Navbar's `currentKey`.",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "href",
        "type": "string",
        "required": true,
        "origin": "own",
        "description": "A page or an in-page anchor (\"/#pricing\"); it goes through the host router.",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "children",
        "type": "React.ReactNode",
        "required": true,
        "origin": "own",
        "description": "A noun for the place (\"Pricing\"), never a verb."
      },
      {
        "name": "isCurrent",
        "type": "boolean",
        "required": false,
        "origin": "own",
        "description": "Marks this link as the page in view, instead of the Navbar's `currentKey`.",
        "schema": {
          "type": "boolean"
        }
      }
    ],
    "NavbarActions": [
      {
        "name": "children",
        "type": "React.ReactNode",
        "required": true,
        "origin": "own",
        "description": "A language switcher, sign-in (subtle), then the one primary action."
      }
    ]
  },
  "tokens": [
    "ds-background-neutral",
    "ds-background-neutral-pressed",
    "ds-background-neutral-subtle-hovered",
    "ds-blanket",
    "ds-border",
    "ds-border-focused",
    "ds-easing-enter",
    "ds-easing-exit",
    "ds-radius-control-medium",
    "ds-radius-medium",
    "ds-shadow-overlay",
    "ds-space-025",
    "ds-space-075",
    "ds-space-100",
    "ds-space-200",
    "ds-space-300",
    "ds-surface-overlay",
    "ds-surface-raised",
    "ds-text",
    "ds-text-subtle"
  ],
  "strings": [
    "close",
    "mainNavigation",
    "newTab",
    "openMenu"
  ],
  "quality": {
    "tests": true,
    "a11y": false,
    "docs": false,
    "visual": false,
    "dark": false,
    "rtl": false,
    "mcp": true,
    "generic": true
  }
}
