Luna

Luna Button Component Guide

Comprehensive guide for using the Luna Button component with all available variants, sizes, and configurations.

Basic Usage

import { Button } from '@/components/common';

<Button variant="primary" size="medium">
  Click Me
</Button>

Button Variants

Primary Button

Main action button with gradient animation effect. Use for primary CTAs.

<Button variant="primary" size="medium" onClick={handleClick}>
  Primary Button
</Button>

Secondary Button

Secondary action button with transparent background and border. Use for secondary actions.

<Button variant="secondary" size="medium" onClick={handleClick}>
  Secondary Button
</Button>

Enterprise Button

Premium enterprise button with purple gradient. Use for enterprise features.

<Button variant="enterprise" size="medium" onClick={handleClick}>
  Enterprise Button
</Button>

Compare Button

Special button for comparison features with rounded border and subtle hover effects. Use for toggle/compare actions.

<Button variant="compare" size="small" onClick={handleClick}>
  Compare All Plans
</Button>

Button Sizes

Small

size="small"

Medium (Default)

size="medium"

Large

size="large"

Button as Link

Use the `as="a"` prop to render the button as an anchor tag for navigation.

Internal Link

See Demo
<Button as="a" variant="secondary" href="#demo">
  See Demo
</Button>

External Link

External Link
<Button as="a" variant="primary" href="https://example.com" 
        target="_blank" rel="noopener">
  External Link
</Button>

Button States

Normal State

Disabled State

<Button variant="primary" disabled>
  Disabled Button
</Button>

All Combinations

Primary

Secondary

Enterprise

Compare

Props API

PropTypeDefaultDescription
as'button' | 'a''button'Element type to render as
variant'primary' | 'secondary' | 'enterprise' | 'compare''primary'Button visual variant
size'small' | 'medium' | 'large''medium'Button size
disabledbooleanfalseWhether button is disabled
onClickfunction-Click handler function
hrefstring-Link URL (when as='a')
targetstring-Link target (when as='a')
relstring-Link relationship (when as='a')
classNamestring-Additional CSS classes
childrenReactNode-Button content

Best Practices

✅ Do

  • Use variant='primary' for main actions
  • Use variant='secondary' for secondary actions
  • Use variant='enterprise' for premium features
  • Use variant='compare' for toggle/compare actions
  • Use as='a' for navigation links
  • Provide meaningful button text
  • Use appropriate sizes for context

❌ Don't

  • Use multiple primary buttons in the same section
  • Make button text too long
  • Use disabled buttons without explanation
  • Mix button and link styling inconsistently
  • Overuse the compare variant outside of comparison contexts