Action swap
CoreSwap an action label while preserving its place and intent.
pnpm dlx shadcn@latest add https://wui.alann.works/r/action-swap.jsonAPI Reference
| Prop | Type | Default |
|---|---|---|
states* | ActionSwapState[] | required |
value | string | — |
defaultValue | string | — |
onValueChange | (value: string, state: ActionSwapState) => void | — |
onAction | (next: ActionSwapState, current: ActionSwapState) => void | PromiseLike<unknown> | — |
failureLabel | string | — |
size | "sm" | "md" | "lg" | — |