Black Friday: 30% off Pro

Get 30% off

Updated

Strike Todos

Preview

Customize

Strike0.35s
Width416px
Max length32

Installation

npx shadcn@latest add https://uibrik.com/r/strike-todos.json
Adds the files to components/uibrik/strike-todos. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/strike-todos.

Usage

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) => {}}/>

Where to use Strike Todos

  • Simple to-do lists

    Checking an item draws a line through it, which is clear and calm.

    Pairs with Flaming Todos

  • 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.

Props

StrikeTodos
placeholder
Type string
"Add a to-do"
strikeDuration
Type number
0.35
How long the line takes to cross a to-do.
dim
Type boolean
true
Fade finished to-dos so the open ones stand out.
width
Type number
416
Width of the list.
maxLength
Type number
32
Longest to-do, in characters.
initialItems
Type string[]
SAMPLE_TODOS
To-dos listed at the start.
onAdd
Type (label: string) => void
–
Called when a to-do is added.
onToggle
Type (label: string, done: boolean) => void
–
Called when a to-do is checked or unchecked.
className
Type string
–
Classes for the list.