Search
Search components and blocks
Action Swap Button
ProA button whose label and icon swap on click. Pulse mode reverts back on its own (a confirmation like 'Copied!'); toggle mode stays swapped until clicked again (a persistent state like light/dark) — switch between them with the mode prop.
Pulse — reverts on its own
Toggle — stays until clicked again
Colored — toggle + activeClassName
Props
PropTypeDefault
mode"pulse" | "toggle""pulse"idleLabelReact.ReactNode—activeLabelReact.ReactNode—idleIconReact.ReactNode—activeIconReact.ReactNode<CheckIcon />resetAfternumber1600activeClassNamestring—activeboolean—defaultActivebooleanfalseonActiveChange(active: boolean) => void—When to use the button
Use these buttons for primary and secondary actions where plain color changes feel flat. Variants cover gradient calls to action, bevel, emboss and stitched looks, blur on hover, and a button that swaps its label to confirm an action.