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/rapidkit

Usage

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.

PropDescription
label or childrenSets the button text using whichever pattern fits your codebase.
variantSwitches between visual emphasis levels such as primary and outlined.
leftIcon and rightIconAdds directional or status icons without custom layout work.
loadingShows a busy state while an action is in progress.
disabledPrevents interaction when the action is not available.
accessDeniedBehaviorChooses 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.