{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "bottom-nav", "type": "registry:ui", "title": "BottomNav", "description": "Pill-shaped frosted bottom navigation, hand-composed from BottomNavItem and BottomNavAction.", "categories": [ "navigation" ], "registryDependencies": [ "https://whiskeyjack.net/r/utils.json" ], "files": [ { "path": "components/ui/bottom-nav.tsx", "type": "registry:ui", "target": "components/ui/bottom-nav.tsx", "content": "import * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface BottomNavProps extends React.HTMLAttributes {\n /**\n * Maximum width constraint for the nav bar\n * @default \"max-w-lg\"\n */\n maxWidth?: string;\n}\n\n/**\n * A pill-shaped bottom navigation bar component.\n *\n * Features:\n * - Fixed to bottom with safe area padding\n * - Constrained width matching content containers\n * - Fully rounded (pill-shaped)\n * - Spacing on left, right, and bottom edges\n *\n * @example\n * ```tsx\n * \n * \n * \n * Home\n * \n * \n * \n * Settings\n * \n * \n * ```\n */\nconst BottomNav = React.forwardRef(\n ({ className, maxWidth = \"max-w-lg\", children, ...props }, ref) => (\n \n \n {children}\n \n \n )\n);\nBottomNav.displayName = \"BottomNav\";\n\nexport interface BottomNavItemProps extends React.HTMLAttributes {\n /**\n * Whether this nav item is currently active\n */\n active?: boolean;\n /**\n * The element type to render (for use with router Link components)\n * @default \"a\"\n */\n as?: React.ElementType;\n /**\n * Href for the navigation item (passed to the underlying element)\n */\n href?: string;\n /**\n * For react-router-dom Link components, use \"to\" instead of \"href\"\n */\n to?: string;\n}\n\n/**\n * Individual navigation item within BottomNav.\n *\n * Supports custom elements via the `as` prop for router integration:\n *\n * @example\n * ```tsx\n * import { Link } from 'react-router-dom'\n *\n * \n * \n * Home\n * \n * ```\n */\nconst BottomNavItem = React.forwardRef(\n ({ className, active, as: Component = \"a\", children, ...props }, ref) => (\n \n {children}\n \n )\n);\nBottomNavItem.displayName = \"BottomNavItem\";\n\nexport interface BottomNavActionProps extends React.HTMLAttributes {\n /**\n * The element type to render (for use with router Link components)\n * @default \"a\"\n */\n as?: React.ElementType;\n /**\n * Href for the action (passed to the underlying element)\n */\n href?: string;\n /**\n * For react-router-dom Link components, use \"to\" instead of \"href\"\n */\n to?: string;\n}\n\n/**\n * Action button within BottomNav (e.g., add button).\n *\n * Uses the solid accent color for action buttons.\n *\n * @example\n * ```tsx\n * import { Link } from 'react-router-dom'\n *\n * \n * \n * \n * ```\n */\nconst BottomNavAction = React.forwardRef(\n ({ className, as: Component = \"a\", children, ...props }, ref) => (\n \n {children}\n \n )\n);\nBottomNavAction.displayName = \"BottomNavAction\";\n\nexport { BottomNav, BottomNavItem, BottomNavAction };\n" } ], "docs": "BottomNav is the hand-composed bar: lay out the items and action yourself when you know they always fit. For a data-driven bar that collapses overflowing items into a hamburger, use MobileBottomNav instead.", "meta": { "group": "navigation", "related": [ "mobile-bottom-nav", "action-pill" ], "exports": [ "BottomNav", "BottomNavItem", "BottomNavAction" ], "siteSlug": "bottom-nav" } }