A contextual AI action bar that appears beneath selected text — explain, improve, shorten, fix grammar, or a custom edit.
Default
Highlight a selection, then Explain / Improve / expand / custom prompt. Demo runs idle → thinking → result once per action.
Loading…
Installation
CLI
Also needs
npm i lucide-react motionUsage
selection-actions.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| leadingText | string | sample lead-in | Text preceding the highlighted selection. |
| selection | string | sample selection | Highlighted text the actions operate on. |
| result | string | sample result | Replacement text after a successful action. |
| className | string | — | Merge classes on the root. |