Componentdata0.41 KB gzipZero dependencies
Stack
Stacked container with staggered angles and hover fan-out.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add stackOr install the full npm package:
npm install bigbulluiUsage
tsx6 lines
import { Stack } from "@/components/ui/stack"; <Stack fanOnHover> <div>Ticket 1</div> <div>Ticket 2</div></Stack>Source code
stack.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxstack.tsx52 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface StackProps extends React.HTMLAttributes<HTMLDivElement> { children: React.ReactNode; fanOnHover?: boolean; className?: string;} export function Stack({ children, fanOnHover = true, className, ...props}: StackProps) { const childArray = React.Children.toArray(children);Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { Stack } from "@/components/ui/stack"; <Stack />| Prop | Type | Description |
|---|---|---|
| children | React.ReactNode | Child elements rendered inside the component. |
| fanOnHover | boolean | Toggles fan on hover. (Default: true) |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |