Set checked from the starred state, and put aria-pressed on the button.
The sample also uses Button. One command adds them with this item:
star-button.tsx
AnimatedStarIcon
<svg>| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "bulk""duotone""solid""stroke""twotone" | — | stroke (default): 1.5 strokes. solid: the body filled, inner details cut through. duotone: a 40% fill under the stroke. twotone: the details at 40%. bulk: the body filled at 40% with no outline, the details at full color. |
| corners | "round""sharp" | — | round (default): round caps and joins, soft corners. sharp: square caps, miter joins. |
| trigger | "hover""none" | — | hover (default) plays once per hover or keyboard focus of the control around the icon. |
| play | number | — | Plays once each time this number changes (a new notice, a saved form). |
| checked | boolean | false | Rated: the star fills and, on each change to true, spins a fifth of a turn with sparks. |
| burst | boolean | true | The sparks on rate. Default true. Set false when the control around the icon draws its own burst, so two bursts never stack. |
| ...props | <svg> attributes | — | Every other attribute goes to the <svg>, with a ref. |







