★ GitHub
Component

Button

The primary interactive element. Buttons trigger actions, submit forms, and navigate users. Every button carries a hard shadow and snaps on press.

Variants

All variants at medium size
tsx
<Button variant="primary">Primary</Button> <Button variant="danger">Danger</Button> <Button variant="ghost">Ghost</Button> <Button variant="outline">Outline</Button>

Sizes

Small, medium, and large
tsx
<Button size="sm">Small</Button> <Button size="md">Medium</Button> <Button size="lg">Large</Button>

States

Disabled

Disabled buttons have reduced opacity and no interaction
tsx
<Button disabled>Disabled Primary</Button> <Button variant="danger" disabled>Disabled Danger</Button> <Button variant="outline" disabled>Disabled Outline</Button>

Loading

Loading state shows a square spinner
tsx
<Button loading>Loading...</Button> <Button variant="danger" loading>Processing</Button>

Effects

Optional hover and visual effects
tsx
<Button effect="slide">Slide Text</Button> <Button effect="pulse">Pulse Effect</Button>

Full Width

Button stretches to fill the container
tsx
<Button fullWidth size="lg">Full Width CTA</Button> <Button variant="outline" fullWidth>Full Width Outline</Button>

Variant × Size Matrix

Every variant at every size

Usage

App.tsx
import { Button } from 'starkit-ui'; import 'starkit-ui/styles'; function App() { return ( <form onSubmit={handleSubmit}> <Button variant="primary" size="lg" loading={isSubmitting} fullWidth > Create Account </Button> </form> ); }

Props

PropTypeDefaultDescription
variant'primary' | 'danger' | 'ghost' | 'outline''primary'Visual style of the button.
size'sm' | 'md' | 'lg''md'Size preset controlling padding and font size.
disabledbooleanfalseDisables the button and prevents interaction.
loadingbooleanfalseShows a spinner and disables interaction.
effect'slide' | 'pulse' | 'none''none'Adds hover or visual animation effects.
fullWidthbooleanfalseStretches the button to fill its container.
prefixIconReactNode—Content rendered before the button label.
suffixIconReactNode—Content rendered after the button label.
classNamestring''Additional CSS classes to merge.

All standard <button> HTML attributes are also supported via ButtonHTMLAttributes.