Back to components
ComponentAI & ChatFree
Inline Rewrite Helper React component
An inline writing assistant with tone selection, async rewrite integration, editable drafts and accept or discard actions.
About the Inline Rewrite Helper component
An inline writing assistant with tone selection, async rewrite integration, editable drafts and accept or discard actions.
Installation
Add the Inline Rewrite Helper component to your project with the shadcn CLI. It lands in components/inline-rewrite-helper.tsx as plain React + Tailwind CSS source you own and can edit.
Install
Copied!
npx shadcn@latest add @reactframe/inline-rewrite-helperOr copy the source by hand and install its dependencies:
Install
Copied!
npm install motion lucide-react clsx tailwind-mergeProps
<InlineRewriteHelper /> accepts 5 props, all optional.
| Prop | Type | Default |
|---|---|---|
| defaultValue | string | "We wanted to reach out to let you know that the new workspace is now ready for you and y… |
| onRewrite | (text: string, tone: RewriteTone) => string | Promise<string> | — |
| onAccept | (text: string) => void | — |
| theme | "dark" | "light" | "dark" |
| className | string | — |
- defaultValuestringDefault: "We wanted to reach out to let you know that the new workspace is now ready for you and y…
- onRewrite(text: string, tone: RewriteTone) => string | Promise<string>
- onAccept(text: string) => void
- theme"dark" | "light"Default: "dark"
- classNamestring
npm dependencies
Installed for you by the shadcn CLI.