'use client'; import { useState } from 'react'; import { BarChart3, FileText, Home, Settings, Users } from 'lucide-react'; import { BorderedNavigationMenu, BorderedNavigationMenuItem, } from '@kit/ui/bordered-navigation-menu'; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from '@kit/ui/card'; import { Label } from '@kit/ui/label'; import { Switch } from '@kit/ui/switch'; import { generatePropsString, useStoryControls } from '../lib/story-utils'; import { ComponentStoryLayout } from './story-layout'; interface BorderedNavigationMenuControls { showIcons: boolean; } export function BorderedNavigationMenuStory() { const { controls, updateControl } = useStoryControls({ showIcons: true, }); const [activeTab, setActiveTab] = useState('#dashboard'); const generateCode = () => { return `import { BorderedNavigationMenu, BorderedNavigationMenuItem } from '@kit/ui/bordered-navigation-menu'; import { usePathname } from 'next/navigation'; const pathname = usePathname(); `; }; const navigationItems = [ { path: '#dashboard', label: 'Dashboard', icon: Home, }, { path: '#users', label: 'Users', icon: Users, }, { path: '#analytics', label: 'Analytics', icon: BarChart3, }, { path: '#reports', label: 'Reports', icon: FileText, }, { path: '#settings', label: 'Settings', icon: Settings, }, ]; const renderPreview = () => (
{navigationItems.map((item) => ( {item.label}
) : ( item.label ) } active={activeTab === item.path} /> ))}

Simulated Navigation

Click tabs above to see active state changes:

{navigationItems.map((item) => ( ))}
); const renderControls = () => ( <>
updateControl('showIcons', checked)} />
); const renderExamples = () => (
Basic Navigation Simple text-only navigation menu Navigation with Icons Navigation menu items with icons and labels Overview
} active={false} /> Team } active={true} /> Config } active={false} /> Responsive Navigation How navigation adapts to different screen sizes

Desktop View

Mobile View (Simulated)

On smaller screens, only active and adjacent items are typically shown, with overflow handled by the navigation system.

); const renderApiReference = () => ( BorderedNavigationMenu Components Complete API reference for BorderedNavigationMenu components

BorderedNavigationMenu

Container component for navigation menu items with bordered active state.

Prop Type Default Description
children ReactNode - BorderedNavigationMenuItem components

BorderedNavigationMenuItem

Individual navigation menu item with automatic active state detection.

Prop Type Default Description
path string - Navigation path/route
label ReactNode | string - Display label or component
active boolean auto-detected Override active state
end boolean | function false Exact path matching
className string - Additional CSS classes
buttonClassName string - CSS classes for button element
); const renderUsageGuidelines = () => (
When to Use BorderedNavigationMenu Best practices for bordered navigation

✅ Use BorderedNavigationMenu For

  • • Primary navigation within sections
  • • Tab-style navigation for related content
  • • Dashboard and admin panel navigation
  • • Settings and configuration sections
  • • Multi-step form navigation

❌ Use Other Patterns For

  • • Site-wide main navigation (use header navigation)
  • • Deep hierarchical navigation (use sidebar)
  • • Single-action buttons (use regular buttons)
  • • Pagination (use pagination component)
Design Guidelines Creating effective navigation experiences

Active State Indication

The bordered bottom line clearly indicates the current active section. Use consistent active state styling across your application.

Label Clarity

Use clear, concise labels that accurately describe the destination. Consider adding icons for better visual recognition.

Responsive Behavior

On smaller screens, non-active items may be hidden to save space. Plan your navigation hierarchy accordingly.

Accessibility Features Built-in accessibility support

Keyboard Navigation

Full keyboard support with Tab navigation and Enter/Space activation.

Screen Reader Support

Proper ARIA attributes and semantic HTML for assistive technologies.

Focus Management

Clear focus indicators and proper focus management during navigation.

); return ( ); }