{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "An app-style tab bar for a phone: an icon over a name, the current tab marked.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/organisms/bottom-nav.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/icons\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// BottomNavProps are the props of BottomNav; the values are the JSON shapes of the TypeScript props.\ntype BottomNavProps struct {\n\tLabel any `json:\"label\"`\n\tTabs any `json:\"tabs\"`\n\tCurrent any `json:\"current\"`\n\tLabels any `json:\"labels\"`\n\tPosition any `json:\"position\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// An app-style tab bar for a phone: an icon over a label per tab, the current one marked. Axes: labels (show, hide: icons only with the name hidden), position (static, sticky: stays at the bottom of the page), tone.\ntempl BottomNav(p BottomNavProps) {\n\t{{ vLabel := p.Label }}\n\t{{ vTabs := p.Tabs }}\n\t{{ vCurrent := uiutils.Def(p.Current, \"\") }}\n\t{{ vLabels := uiutils.Def(p.Labels, \"show\") }}\n\t{{ vPosition := uiutils.Def(p.Position, \"static\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\tif uiutils.Gt(uiutils.Len(vTabs), float64(0)) {\n\t\t@compose.Block(compose.BlockProps{BoxProps: box.BoxProps{Tag: \"nav\", Class: uiutils.S(uiutils.Cnv(\"mx-auto w-full max-w-md border-t border-border\", uiutils.Cond(uiutils.T(uiutils.Eq(vTone, \"muted\")), \"bg-muted\", \"bg-background\"), uiutils.Cond(uiutils.T(uiutils.Eq(vPosition, \"sticky\")), \"sticky bottom-0 z-40\", \"\"))), Attrs: uiutils.Attrs(\"aria-label\", uiutils.Coalesce(vLandmarkLabel, vLabel), \"data-position\", vPosition, \"data-slot\", \"bottom-nav\")}}) {\n\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Class: \"m-0 grid list-none grid-flow-col auto-cols-fr p-0\", Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\tfor _, vTab := range uiutils.L(vTabs) {\n\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"data-slot\", \"tabs-row\")}}) {\n\t\t\t\t\t\t@MenuEntry(MenuEntryProps{Href: uiutils.Get(vTab, \"href\"), Class: uiutils.Cnv(uiutils.Cnv(\"flex flex-col items-center gap-2 py-2 text-xs\", uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vTab, \"id\"), vCurrent)), \"font-semibold text-primary\", \"text-muted-foreground\"))), Current: uiutils.Eq(uiutils.Get(vTab, \"id\"), vCurrent), Testid: \"item\"}) {\n\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vTab, \"icon\")), Size: 20})\n\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLabels, \"hide\")), \"sr-only\", \"\"))}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vTab, \"name\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/bottom-nav.templ",
      "target": "blocks/bottom-nav.templ"
    }
  ],
  "meta": {
    "category": "dashboard",
    "group": "navigation",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "bottom-nav",
  "registryDependencies": [
    "block",
    "inline",
    "kit-box",
    "kit-text",
    "list",
    "list-item",
    "lucide-icon",
    "menu-entry",
    "utils"
  ],
  "runtime": "templ",
  "title": "Bottom Nav",
  "type": "registry:block"
}
