Components
Prompt Glow
A prompt box with a glow ring while the model works.
ProPro, coming soon.
<PromptGlow>
<PromptBox />
</PromptGlow>Get notified
Prompt Glow is a Pro effect. Join the waitlist and we'll email you when it's available.
Usage
Wrap your prompt box. While active is on, a coloured ring turns around it with a soft glow behind. Give the box its own background so the ring only shows at the edge, and match radius to its border radius.
import { PromptGlow } from "@zjkm/pro/prompt-glow";
export function Composer({ busy }: { busy: boolean }) {
return (
<PromptGlow active={busy} radius={16}>
<textarea className="rounded-2xl bg-white p-4" aria-label="Prompt" />
</PromptGlow>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Your prompt box. | |
active | boolean | true | Shows the ring and glow. |
colors | string[] | cyan, violet, pink | Colours around the ring. Repeat the first at the end for a seamless loop. |
speed | number | 3 | Seconds per turn. |
width | number | 2 | Pixels of ring outside the box. |
blur | number | 14 | Pixels of soft glow. |
radius | number | 16 | Corner radius in pixels. Match your box's border-radius. |
className | string | Classes for the wrapper. |
With reduced motion, the ring stays still.