Agents
Add it with your AI
With Optic connected, your agent calls add_block and the Swipe deck 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 Swipe deck block (add_block, kind "swipe-deck") where it fits the design, then restyle its parts (Card) to match the frame around it. Keep each part's name so it keeps working. Settings you can change: fling.
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.
- Card
Settings
| Setting | Key for your agent |
|---|---|
| Fling distance | fling |
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.
- DialDRAGA knob you turn by dragging around it. The value reads out below as it moves.
- Hold to deletePRESSPress and hold. The button fills while held and only deletes when the fill completes; letting go early undoes it.