Inline edit

Core

Rename in place: the text becomes a field without moving.

pnpm dlx shadcn@latest add https://wui.alann.works/r/inline-edit.json
Activate to edit.Enter saves, Escape cancels.

API Reference

PropTypeDefault
value*stringrequired
onSave*(next: string) => void | Promise<unknown>required
label*stringrequired
validate(next: string) => string | null | undefined—
placeholderstring—
multilineboolean—
variant"title" | "body"—
as"span" | "p" | "h1" | "h2" | "h3"—
classNamestring—
Categories
inputs
Dependencies
lucide-reactmotion