UI component
Button
Button covers primary actions, secondary actions, and busy states with a small API that still leaves room for icons and access-aware behavior.
Installation
Install the package in your app.
pnpm add @rapidset/rapidkitUsage
Import components from the package entrypoint.
import { Button, ButtonVariant } from '@rapidset/rapidkit';Examples
Preview the component and copy the snippet.
API Reference
Commonly used props at a glance.
| Prop | Description |
|---|---|
| label or children | Sets the button text using whichever pattern fits your codebase. |
| variant | Switches between visual emphasis levels such as primary and outlined. |
| leftIcon and rightIcon | Adds directional or status icons without custom layout work. |
| loading | Shows a busy state while an action is in progress. |
| disabled | Prevents interaction when the action is not available. |
| accessDeniedBehavior | Chooses whether gated actions stay visible but disabled or stay hidden. |
Accessibility
Button renders a native button element, so keyboard activation, focus handling, and standard ARIA attributes work as expected.
Optional access rules
If you provide access rules, Button can either stay disabled or disappear based on the experience you want for unavailable actions.