Agents
Add it with your AI
With Optic connected, your agent calls add_block and the Dial lands in your file as real layers, in your file’s colors and corners, as one change you can undo. Paste this to it:
In my Optic file, add a Dial block (add_block, kind "range-dial") where it fits the design, then restyle its parts (Knob, Value, Ring) to match the frame around it. Keep each part's name so it keeps working. Settings you can change: min, max, value, unit.
Make it yours without code
- Restyle any part. Click it on the canvas and change its color, size, text or corners.
- Tune how it behaves. Select the block and open Interaction in the right panel.
- Try it. Press Interact (X) in Optic. Run, Build and your site play it as real HTML and CSS.
Parts
The interaction finds these layers by name. Restyle them freely and keep the names.
- Knob
- Value
- Ring
Settings
| Setting | Key for your agent |
|---|---|
| Minimum | min |
| Maximum | max |
| Start value | value |
| Unit | unit |
Works in your tools
The same Dial goes into each tool the way that tool works natively. Copies take the look the preview is showing; switch Dark or Light above first.
- FramerA live code component. Paste it on the canvas; it plays on your site, with its colors, corners, words and settings in the right panel.
- FigmaA component with every state as a variant and the interactions between them, so it plays in Present. Paste it into the VE Blocks plugin, coming soon to Figma Community.
- PaperEditable layers. Paste it on the canvas and restyle every part, then take it out again as code.
- React and HTMLA component, or a single page, that plays the block as it is. Keep the layer names and restyle freely.
More drag blocks
- Slide to confirmDRAGDrag the knob all the way to confirm. Let go early and it springs back.
- Range sliderDRAGDrag or press anywhere on the track. The value follows, and the thumb swells while you hold it.
- Before and afterDRAGTwo versions on top of each other. Drag the handle to reveal more of either. Drop your own images into Before and After.
- Reorder listDRAGDrag any row up or down. The others slide out of the way and it settles into its new place.
- Swipe deckDRAGA deck of cards. Fling the top one left or right and the next rises to take its place; it loops forever.
- Hold to deletePRESSPress and hold. The button fills while held and only deletes when the fill completes; letting go early undoes it.