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.