All effects
Parameter playground

Drag a slider: the demo replays itself so the difference is visible, and the matching number inside the prompt is rewritten. Copy it and you take a prompt tuned to your taste.

Segment gap 3px The gap changes instantly - 0 fuses into one solid bar, 12 keeps every block apart; pull-out still works
Segments 4 段 Rebuilds by share instantly: 4 keeps every block fat, 7 squeezes small ones into slivers
Charts

Stacked Share Bar

One segmented bar for the whole; tap a segment and it pulls out with its name and percentage.

AI Prompt
Make a stacked share bar of 4 segments that leaves a 3px gap between segments: one full-width bar divided into segments; tapping a segment pulls it outward (offset plus slight scale) and reveals its name and percentage. HTML/CSS plus vanilla JS.

How it works

The segmented ratio bar is the cheapest premium feel in the whole set: one flex container, each segment sized by percentage, 2px seams between segments (border or gap), rounded corners only at the bar's two ends. Tapping a segment plays a two-step motion - translateY(-6px) to pull it out plus scale(1.04) to swell it slightly - while the remaining segments desaturate, collapsing attention onto the choice. A small bubble with the segment's name and percentage floats up over it with a 150-millisecond rise-and-fade.

Craft lives in the edges: the pull direction should be perpendicular to the bar (sideways for vertical bars), the bubble centers within the segment but clamps inside the screen, and tapping the same segment again or the empty area restores everything. Every frame touches only transform and opacity, so a dozen segments animating at once still glide.

How to use this prompt

For budget composition, time allocation, traffic sources - any whole-versus-parts reading, and on mobile a single slim bar beats a pie chart for space. Send the segment names and values and the AI builds layout and tap logic. Past about 8 segments, instruct it to merge the smallest into Other, or the seams grow wider than the slivers they separate.

Tips for better results

Hide in-segment text below 5% width and let the bubble carry the label - no ant-sized type. Use one hue at several lightness steps plus a single accent on the largest segment; rainbow palettes look cheap by comparison. On desktop, hover lifts 2px and click does the full pull-out: two feedback tiers that feel deliberate. Handle end rounding with overflow: hidden on the container instead of rounding each segment - one rule, no seam leaks at the corners.

Keep exploring