# Strike Todos

> A plain to-do list: checking an item draws a line through it, and unchecking wipes the line away.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Components › Data Display |
| Live preview | https://uibrik.com/components/strike-todos |
| Writes | 1 file into `components/uibrik/strike-todos/` |
| Packages | none beyond React |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/strike-todos.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/strike-todos`.

Can't run commands? https://uibrik.com/components/strike-todos/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { StrikeTodos } from "@/components/uibrik/strike-todos/strike-todos";

const initialItems = [
  "Design the interface",
  "Build the components",
  "Polish the details",
  "Ship it to production",
];

<StrikeTodos
  placeholder="Add a to-do"
  strikeDuration={0.35}
  dim
  width={416}
  maxLength={32}
  initialItems={initialItems}
  onAdd={(label) => {}}
  onToggle={(label, done) => {}}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/strike-todos.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `placeholder` | `string` | `"Add a to-do"` |  |
| `strikeDuration` | `number` | `0.35` | How long the line takes to cross a to-do. |
| `dim` | `boolean` | `true` | Fade finished to-dos so the open ones stand out. |
| `width` | `number` | `416` | Width of the list. |
| `maxLength` | `number` | `32` | Longest to-do, in characters. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `initialItems` | `string[]` | `SAMPLE_TODOS` | To-dos listed at the start. |
| `onAdd` | `(label: string) => void` |  | Called when a to-do is added. |
| `onToggle` | `(label: string, done: boolean) => void` |  | Called when a to-do is checked or unchecked. |
| `className` | `string` |  | Classes for the list. |

## Where it fits

- **Simple to-do lists**: Checking an item draws a line through it, which is clear and calm. Pairs with [Flaming Todos](https://uibrik.com/components/flaming-todos.md) (Pro).
- **Onboarding checklists**: Unchecking wipes the line away, so mistakes are easy to undo.
- **Shopping lists**: A plain list suits small tools where effects would distract.

## Same shelf: Data Display

- [Swipe Rows](https://uibrik.com/components/swipe-rows.md) (Pro): A list whose rows swipe open to reveal actions, with iOS physics: buttons fan out from under the row, a full swipe runs the edge action and the list closes the gap.
- [Tree View](https://uibrik.com/components/tree-view.md): A file and folder tree with folders that ease open, guide lines, a sliding selection and full tree keyboard control.
- [Bulk Select](https://uibrik.com/components/bulk-select.md) (Pro): A selectable list with a floating action bar: shift-click ticks a range in a wave, the count pill widens into a toolbar, pointing at an action tints the rows it will touch, and archived rows collapse as their avatars fly into the bar.
- [Code Block](https://uibrik.com/components/code-block.md): A code block that shows plain text at once and colours it in place with on-demand Shiki, with tabs that sync across blocks, marked lines, diffs, collapsing and a copy button.
- [Gravity Sort](https://uibrik.com/components/gravity-sort.md) (Pro): A sortable, filterable table whose rows have weight: the order changes at once, and each row moves on a spring of its own mass, the heaviest leaving first and on top, while filtered rows fade where they stand and the rest glide to close the gaps.
- [Request Waterfall](https://uibrik.com/components/request-waterfall.md): A network waterfall without the noise: a type icon per request, bars that draw in the order requests started, and hovering one pulls it apart into DNS, connect, TLS, waiting and download, draws guides at its start and end and dims the rest. Opening a row lays out each phase on the same time axis, and hovering a marker dims every request that finished after it.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/strike-todos/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
