Todo Item
Server ComponentInteractive todo row with priority, due date, labels, and subtasks.
Import
tsx
import { TodoItem } from "@cronus-ui/ui";
bash
npx cronus-ui add todo-item
Examples
.cronus
No audit fixture declares this family in .cronus yet.
API Reference
Generated from the component's exported types.
TodoItemLabels
| Prop | Type | Default | Description |
|---|---|---|---|
complete* | string | — | — |
subtasks* | string | — | — |
TodoItemProps
Extends Omit<HTMLAttributes<HTMLElement>, "title" | "onClick" | "id">, VariantProps<typeof todoItemVariants>
| Prop | Type | Default | Description |
|---|---|---|---|
ref | Ref<HTMLElement> | — | Ref forwarded to the underlying DOM node. |
id* | string | — | — |
title* | string | — | — |
description | string | — | — |
completed* | boolean | — | — |
priority | TodoPriority | "none" | — |
dueDate | string | Date | — | — |
labels | TodoLabel[] | — | Override default English strings. |
subtasks | TodoSubtask[] | — | — |
project | TodoProject | — | — |
onToggleComplete | (id: string, completed: boolean) => void | — | — |
onClick | (id: string) => void | — | — |
isSelected | boolean | false | — |
locale | string | "en-US" | — |
now | Date | — | — |
copy | Partial<TodoItemLabels> | — | — |
selected | "true" | "false" | false | One of "true" | "false". |
asChild | boolean | — | Render as the child element via Slot. |
children | ReactNode | — | Contents of the component. |
className | string | — | Additional class names merged onto the root. |