This component no longer exists. It was in diceui/base’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-13 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
editable-todo-list-demo
diceui-base/editable-todo-list-demoRemovedExample
diceui/base publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/sadmann7/diceui/HEAD/docs/public/r/styles/base-vega/editable-todo-list-demo.jsonSource
1"use client";23import { Edit, Trash2 } from "lucide-react";4import * as React from "react";5import { cn } from "@/lib/utils";6import { Button } from "@/registry/bases/base/ui/button";7import { Checkbox } from "@/registry/bases/base/ui/checkbox";8import {9 Editable,10 EditableArea,11 EditableInput,12 EditablePreview,13 EditableTrigger,14} from "@/registry/bases/base/ui/editable";1516interface Todo {17 id: string;18 text: string;19 completed: boolean;20}2122export default function EditableTodoListDemo() {23 const [todos, setTodos] = React.useState<Todo[]>([24 { id: "1", text: "Ollie", completed: false },25 { id: "2", text: "Kickflip", completed: false },26 { id: "3", text: "360 flip", completed: false },27 { id: "4", text: "540 flip", completed: false },28 ]);2930 const onDeleteTodo = React.useCallback((id: string) => {31 setTodos((prev) => prev.filter((todo) => todo.id !== id));32 }, []);3334 const onToggleTodo = React.useCallback((id: string) => {35 setTodos((prev) =>36 prev.map((todo) =>37 todo.id === id ? { ...todo, completed: !todo.completed } : todo,38 ),39 );40 }, []);4142 const onUpdateTodo = React.useCallback((id: string, newText: string) => {43 setTodos((prev) =>44 prev.map((todo) => (todo.id === id ? { ...todo, text: newText } : todo)),45 );46 }, []);4748 return (49 <div className="flex w-full min-w-0 flex-col gap-2">50 <span className="font-semibold text-lg">Tricks to learn</span>51 {todos.map((todo) => (52 <div53 key={todo.id}54 className="flex items-center gap-2 rounded-lg border bg-card px-4 py-2"55 >56 <Checkbox57 checked={todo.completed}58 onCheckedChange={() => onToggleTodo(todo.id)}59 />60 <Editable61 key={todo.id}62 defaultValue={todo.text}63 onSubmit={(value) => onUpdateTodo(todo.id, value)}64 className="flex flex-1 flex-row items-center gap-1.5"65 >66 <EditableArea className="flex-1">67 <EditablePreview68 className={cn("w-full rounded-md px-1.5 py-1", {69 "text-muted-foreground line-through": todo.completed,70 })}71 />72 <EditableInput className="px-1.5 py-1" />73 </EditableArea>74 <EditableTrigger75 render={<Button variant="ghost" size="icon" className="size-7" />}76 >77 <Edit />78 </EditableTrigger>79 </Editable>80// … truncated
What it pulls in
npm packages
Other registry items
