Theme
Sound
Jump to a component
AniCanonKit · Story
StateChange
StateChange is a change written as before → after: two badges, the before faded.
Live, from @anicanon/sakuga 2.0.0
Sakuga for iOS and Android is coming
iOS
Web only
StateChange is made for the web, and isn’t part of Sakuga for iOS yet.
Android
Web only
StateChange is made for the web, and isn’t part of Sakuga for Android yet.
- Use it for
- A change written as before and after, two badges with the before faded: a place that starts burning, a bond that turns to rivals.
Guidelines
afterVariant="alert"for a change for the worse (burning, dead, rivals). Leavebeforeout for a state with no prior value.
import { StateChange } from '@anicanon/sakuga/anicanonkit';
export default function StateChangeExample() {
return (
<StateChange
before="Friends"
after="Rivals"
afterVariant="alert"
afterIcon="bolt"
beforeIcon="heart"
/>
);
}PropsStateChangeProps
afterrequiredstringbeforestringafterVariant'new' | 'alert'afterIconIconNamebeforeIconIconNameAn IconName is any of the names Icon lists.
Each token reads a role, and the role lands on a value in each theme. Change the role and every component that reads it follows.
Colour
state-arrowStateChange: the arrow between before and after.text-mutedneutral-600#5c5b67text-mutedneutral-400#a3a3a7Space and shape
state-gapgap-sm6px
state-before-opacityopacity-legible0.8
state-arrow-icon-sizeicon-size-xs14px
Motion
state-after-swap-animationmotion-swapsk-swap 160ms cubic-bezier(0, 0, 0, 1)
Checked automatically with axe-core 4.11.4 against WCAG 2.2 A and AA, on the live preview above, in light and dark, on 26 October 2026.
- Result
- No issues found, in light or in dark.
- By design
- Not focusable; read as "Changed from", the before badge, "to" and the after badge, with the arrow itself hidden, and with no
beforeit reads the after badge alone. - Not tested
- The automated check doesn't test keyboard use, focus order or what a screen reader says. The lines above are the design system's own account of them.