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.

Sector stroke 24px Sectors thicken instantly: 16 is a steel band, 36 fuses into a solid donut
Pop-out 9px A sector auto-pops out and holds: 0 no shift, 18 clearly flies off
Charts

Interactive Donut Chart

Segments draw in clockwise sequence; tap one to pull it out while the center shows its name and share.

AI Prompt
Make a donut chart: on entry the segments draw in one by one clockwise (stroke-dashoffset animation, 24px sector stroke); tapping a segment shifts it outward (pops out 9px) with a highlight while the center displays that segment's name and percentage. SVG.

How it works

Each slice of the donut is a circle's stroke fragment: stroke-dasharray set to the arc length followed by the remaining circumference, and stroke-dashoffset shifted negative so the fragment rotates to its starting angle. The entrance animates each slice's visible arc from zero to target with incrementing transition-delay, so the ring draws itself clockwise slice by slice.

The tap-to-explode interaction hides a famous trap: SVG transform origin defaults to the canvas top-left, not the circle center, so a naive translate flings slices to strange places. Pin transform-origin to the circle center (or set transform-box: fill-box per slice), then translate each slice outward 6 to 10px along its own angle bisector - that is a clean pull-out. The center label crossfades to the selected slice's name and percentage while the rest of the ring dims slightly.

How to use this prompt

For spending categories, time composition, channel mix - 3 to 6 parts of a whole. Provide names, values, and colors; the AI handles arc math and offset logic. For a more theatrical entrance, add: slices draw in 80 milliseconds apart, full ring in one second.

Tips for better results

Leave a 2-degree background-colored gap between slices - seamed rings read far more refined than solid ones. Keep the smallest slice above 3% or it becomes invisible and untappable. Use a fixed 8px pull-out distance for every slice, not proportional - small slices flying far look like they fell out. Crossfade the center text over 120 milliseconds so numbers never hard-swap. Link the legend: hovering a legend item pulls out its slice too, so exploration works from both directions. And keep stroke-linecap butt - round caps bulge at every slice junction.

Keep exploring