Button

A versatile button component that supports various styles, sizes, and interactive states. Built on top of our design system for consistent styling and behavior.

Examples

1import { Button, FlexBox } from '@sugarcoat/ui'
2
3<FlexBox gap='3' justify='center'>
4 <Button>Click Me</Button>
5</FlexBox>
6

API Reference

ComponentDescription
Button

A versatile button component that supports various styles, sizes, and interactive states. Built on top of our design system for consistent styling and behavior.

Component Properties

Button
PropTypeDefaultExplanation
sizestringmd

The size of the Button.

variantstringdefault

The visual style variant of the button

colorstringdefault

The color scheme of the button

borderstring-

The border style (only applicable to outline variant)

shadowstring-

The shadow size of the button

iconReact.ReactNode-

Optional icon element to display alongside the button text

tooltipstring-

Optional tooltip text to show on hover

hrefstring-

Optional URL to navigate to when clicked (turns button into a link)

targetstring-

Optional target attribute when using href (e.g., '_blank')

iconPositionstringleft

Position of the icon relative to the text

blockbooleanfalse

Whether the button should take the full width of its container

animationbooleantrue

Whether the button should have transition animations

Customize The Look
Check out these sample themes
Or create your ownBrand color
Accent color
Neutral color
Border radius