Prompt weight (Pro)
ProIncluded in $99Weight words in an image prompt by feel: the word itself grows heavier and takes on colour.
On this page
ProPick a word and scroll, drag or use the arrows: it grows heavier and takes on colour as it gains weight, or thins and fades as it loses it, with its weight above it.
Pick a word and scroll, drag up or down, or use the arrow keys. The word grows heavier and takes on colour as it gains weight, or thins and fades as it loses it, pushing the words around it aside, with its weight above it. You can read the emphasis of the whole prompt at a glance, before you generate anything. Punctuation never takes weight.
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { PromptWeight, weightedPrompt } from "@/components/ui/chatcn/pro/prompt-weight"
<PromptWeight prompt={prompt} weights={weights} onWeightsChange={setWeights} />
generate(weightedPrompt(prompt, weights)) // "a (misty:1.4) cliff"Props
| Prop | Type | Notes |
|---|---|---|
prompt | string | |
weights / onWeightsChange | Record<number, number> | By word index; missing is 1 |
min / max | number | Default 0.5 and 1.6 |
Keyboard
| Key | Action |
|---|---|
Arrow Up / Arrow Down | Weight the focused word by 0.1 |
Home / 0 | Back to 1 |
Accessibility
- Each word is a slider with its weight as the value.
Motion
- Size, weight and colour transition 200 ms. Reduced motion: they change at once.