Skip to content

Button

A clickable button component with multiple variants and sizes.

Default
Secondary
Outline
Ghost

Installation

bash
npx @galaxy-stack/nebula-cli@latest add button
bash
pnpm dlx @galaxy-stack/nebula-cli@latest add button
bash
yarn dlx @galaxy-stack/nebula-cli@latest add button
bash
bunx @galaxy-stack/nebula-cli@latest add button
bash
# If you have installed galaxy-design globally
galaxy-design add button

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

PropTypeDefaultDescriptionFramework Support
variant`'default''destructive''outline''secondary'
size`'default''sm''lg''icon'`
asChildbooleanfalseRender as child element using Radix SlotReact, Vue only
disabledbooleanfalseWhether the button is disabledAll

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)

License

MIT © 2025 Bùi Trọng Hiếu (kevinbui)

Released under the MIT License.