Componentdata0.77 KB gzipZero dependencies
List
List with dashed, numbered and icon variants plus staggered item entrances and List/ListItem composition.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add listOr install the full npm package:
npm install bigbulluiUsage
tsx5 lines
import { List, ListItem } from "@/components/ui/list"; <List variant="numbered"> <ListItem id="1" title="Doors">Gates open at 19:00.</ListItem></List>Source code
list.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxlist.tsx85 lines
import * as React from "react";import { cn } from "./lib/utils"; export interface ListItemProps { id: string; title?: React.ReactNode; content?: React.ReactNode; variant?: "dashed" | "numbered" | "icon"; className?: string; children?: React.ReactNode;} export interface ListProps extends React.HTMLAttributes<HTMLUListElement> { items?: ListItemProps[]; variant?: "dashed" | "numbered" | "icon";} export function ListItem({ id, title, content, variant = "dashed", className, children, ...props }: ListItemProps) {Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { ListItem } from "@/components/ui/list"; <ListItem />| Prop | Type | Description |
|---|---|---|
| items | ListItemProps[] | Structured list of items rendered by the component. |
| variant | "dashed" | "numbered" | "icon" | Visual style variant. (Default: "dashed") |
| id | string | DOM element identifier for label association and testing. |