Button
A clickable button component with multiple variants and sizes.
Default
Secondary
Outline
Ghost
Installation
bash
npx @galaxy-stack/nebula-cli@latest add button1
bash
pnpm dlx @galaxy-stack/nebula-cli@latest add button1
bash
yarn dlx @galaxy-stack/nebula-cli@latest add button1
bash
bunx @galaxy-stack/nebula-cli@latest add button1
bash
# If you have installed galaxy-design globally
galaxy-design add button1
2
2
Dependencies
This component automatically installs the following dependencies:
- React:
@radix-ui/react-slot,class-variance-authority - Vue:
radix-vue,class-variance-authority - Angular:
@radix-ng/primitives,class-variance-authority - React Native:
nativewind,tailwindcss - Flutter: No additional dependencies (uses Material Design 3)
No manual installation needed!
Usage
Basic Example
Basic usage examples will be added here.
API Reference
Props
| Prop | Type | Default | Description | Framework Support |
|---|---|---|---|---|
variant | `'default' | 'destructive' | 'outline' | 'secondary' |
size | `'default' | 'sm' | 'lg' | 'icon'` |
asChild | boolean | false | Render as child element using Radix Slot | React, Vue only |
disabled | boolean | false | Whether the button is disabled | All |
Accessibility
- Keyboard Navigation: Space/Enter to activate
- Screen Reader: Uses semantic
<button>element with proper ARIA attributes - Focus Management: Focus visible with ring styles
- WCAG Compliance: WCAG 2.1 Level AA compliant
Author
Bùi Trọng Hiếu (kevinbui)
- GitHub: @buikevin
- Email: kevinbui210191@gmail.com
License
MIT © 2025 Bùi Trọng Hiếu (kevinbui)
