Componentform1.03 KB gzipZero dependencies

Inline Edit

Click-to-edit field with focus outline, animated save pulse, and cancel action.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add inline-edit

Or install the full npm package:

npm install bigbullui

Usage

tsx7 lines
import { InlineEdit } from "@/components/ui/inline-edit"; <InlineEdit  label="SEAT ASSIGNMENT"  defaultValue="ROW C · SEAT 12"  onSave={(val) => console.log(val)}/>

Source code

inline-edit.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxinline-edit.tsx147 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface InlineEditProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {  value?: string;  defaultValue?: string;  onSave?: (newValue: string) => void;  placeholder?: string;  label?: string;  className?: string;} export function InlineEdit({  value: controlledValue,  defaultValue = "",  onSave,

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { InlineEdit } from "@/components/ui/inline-edit"; <InlineEdit />
PropTypeDescription
valuestringControlled value.
defaultValuestringInitial value when uncontrolled. (Default: "")
onSave(newValue: string) => voidCallback invoked on save.
placeholderstringPlaceholder text shown when empty. (Default: "Click to edit...")
labelstringAccessible label text rendered or attached to the control.
classNamestringOptional Tailwind or custom CSS classes merged with component styles.