Componentdata0.73 KB gzipZero dependencies
Task List
Task rows with assignee chips and priority badges.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add task-listOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { TaskList } from "@/components/ui/task-list"; <TaskList />Source code
task-list.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxtask-list.tsx52 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface TaskListProps extends Omit<React.HTMLAttributes<HTMLUListElement>, "onToggle"> { tasks: { id: string; label: string; assignee?: string; priority?: "low" | "med" | "high"; done?: boolean }[]; onToggle?: (id: string) => void;} const PRI: Record<string, string> = { low: "text-muted-foreground", med: "text-warning", high: "text-destructive" }; /** Task list item rows: assignee chip + priority dot indicator. */export function TaskList({ tasks = [], onToggle, className, ...props }: TaskListProps) { const [entry, setEntry] = React.useState(() => ({ base: tasks, list: tasks })); const state = entry.base === tasks ? entry.list : tasks; return (Props
| Prop | Type | Description |
|---|---|---|
| tasks | { id: string; label: string; assignee?: string; priority?: "low" | "med" | "high"; done?: boolean }[] | Configures tasks. (Default: []) |
| onToggle | (id: string) => void | Callback invoked on toggle. |