Forms

EditableText

At rest it reads as the value: no box, no pencil. Hovering lights it up like everything you can touch, and a click, a tap or Enter turns it into an input in the same place, at the same size. Enter or leaving the field saves at once and rolls back if the save fails; Escape puts the old value back. Use it instead of an Edit button or a Rename dialog for one field. A person without the permission sees plain text.

import { EditableText } from "@/components/ui/editable-text"