GT Components

Button Component

A versatile button component with customizable sizes and styling through class props.

Color Variants

Customize button appearance using Tailwind CSS classes for backgrounds and hover states.

Slate
Gray
Zinc
Neutral
Stone
Blue
Green
Red
Purple
Orange
Yellow
Pink

Size Variants

Five predefined sizes from extra small to extra large for different use cases.

xs
sm
md
lg
xl

Interactive Examples

Real-world button examples with different semantic meanings and styling.

Primary Action

Main call-to-action button

Danger Action

Destructive or warning button

Component Props

Available properties for the Button component.

PropTypeDefaultDescription
labelstringundefinedThe text displayed on the button
size'xs' | 'sm' | 'md' | 'lg' | 'xl''md'Controls button size and padding
classstring''Additional CSS classes for styling
onclickfunctionundefinedClick event handler
disabledbooleanfalseDisables the button when true
type'button' | 'submit' | 'reset''button'HTML button type