Inline textarea — dir/ui
Edit multiline text in place with save and cancel controls.
# Inline textarea
Edit multiline text in place with save and cancel controls.
## Install
```sh
npx shadcn@4.21.0 add lr-run/dir-ui/inline-textarea#v0.1.2
```
[Registry item with source and dependencies](https://github.com/lr-run/dir-ui/blob/v0.1.2/registry.json)
Requires React 19, Tailwind CSS 4 and shadcn initialized with Base UI. Registry target placeholders resolve through components.json: @ui, @components, @hooks and @lib. Imports below use the conventional @/ prefix for illustration; the CLI rewrites them to your configured aliases. Shared components are installed once through registryDependencies. Theme CSS is imported by the UI modules. Existing files are never forcibly overwritten; review CLI conflicts before accepting changes. No Dir runtime is required.
## InlineTextarea
```tsx
import { InlineTextarea } from '@/components/ui/inline-edit.tsx'
```
| Prop | Type | Default / required | Notes |
| --- | --- | --- | --- |
| label | string | Required | |
| value | string | Required | |
| onValueChange | (value: string) => void \| Promise<void> | Required | Emits the raw string. Convert to a number in the caller if needed. Rejected saves retain the draft. |
| disabled | boolean | false | |
| placeholder | string | Add a value | |
| validate | (value: string) => string \| undefined | — | Return an error to prevent saving. |
| display | ReactNode | Formatted value | Optional custom value display. |
| rows | number | 4 | |
The inline counterpart of Textarea. Cmd/Ctrl+Enter or an outside click saves; Enter inserts a newline and Escape cancels.