Sidebar Button
A minimalist button optimized for sidebar navigation. Features an active state indicator, category indentation, and smooth transition effects for a premium navigation experience.
uiclass-variance-authorityframer-motion
Installation
$npx futureuikit add sidebar-button
Import
import { SidebarButton } from "@/components/ui/sidebar-button"
Layout Variant
Color Theme
Shape
Size
Spacing
Named Keys & Props
Pass these exact named keys as props on <SidebarButton />. Click any color pill to copy the prop.
colorDefault is "default"(Black & White)variantVisual style"solid""outline""ghost""link"shapeCorner shape"default""square""rounded""sharp"spacingInner spacing"default""2x""4x""6x""8x"sizeComponent size"default""sm""md""lg""xl"Usage Example
A basic implementation example to get you started.
Example Implementation
import { SidebarButton } from"@/components/ui/sidebar-button";
export default function Example() {
return (
<div className="w-64 space-y-1">
<SidebarButton label="Dashboard"isActive />
<SidebarButton label="Settings"/>
<SidebarButton label="User Profile"isCategory />
</div>
);
}Features
Key capabilities and highlights.
Key Capabilities
- ◆Minimalist design focused on text and active state clarity.
- ◆Built-in'isActive'prop with a visual dot indicator and typography change.
- ◆Supports'isCategory'for hierarchical indentation in navigation lists.
- ◆Hover effects and smooth transitions for interactive feedback.
- ◆Perfect for dashboard sidebars and complex navigation systems.
Notes
Important implementation details to consider.
Implementation Details
- ◆Install: Run'npx futureuikit add sidebar-button'.
- ◆Import:'import { SidebarButton } from "@/components/ui/sidebar-button";'
- ◆State: Control the'isActive'prop based on your current route/path for visual navigation feedback.
- ◆Hierarchy: Use'isCategory={true}'for parent-level menu items or group headers.
- ◆Styling: The component automatically handles light/dark mode transitions and active state colors.