Button

Get started with the basics of using the theme.

experimental
---
import Button from '@/components/Button.astro';
---

<Button>Button</Button>

Variants

Rocketship components come with different variants. You can customize the components by changing the variant.

variantdescriptionexamplecode
solidSolid Button<Button variant="solid">Button</Button>
outlineOutline Button<Button variant="outline">Button</Button>
softSoft Button<Button variant="soft">Button</Button>
ghostGhost Button<Button variant="ghost">Button</Button>
surfaceSurface Button<Button variant="surface">Button</Button>

Sizes

Rocketship components now use a numeric scale for sizes, corresponding to specific text styles. You can customize the components by changing the size.

sizedescriptionexamplecode
1Tiny Button<Button size="1">Button</Button>
3Small Button<Button size="3">Button</Button>
5Medium Button<Button size="5">Button</Button>

Note: Sizes 2, 4, 6, and 8 are also available for more fine-grained control.

Radius

Rocketship components come with different radius options. You can customize the components by changing the radius.

radiusdescriptionexamplecode
smSmall Radius<Button radius="sm">Button</Button>
mdMedium Radius<Button radius="md">Button</Button>
lgLarge Radius<Button radius="lg">Button</Button>
fullFull Radius<Button radius="full">Button</Button>

Colors

Rocketship components come with different colors based on the Radix color system. You can customize the components by changing the color.

colordescriptionexamplecode
indigoindigo Color<Button color="indigo">Button</Button>
blueBlue Color<Button color="blue">Button</Button>
cyanCyan Color<Button color="cyan">Button</Button>
tealTeal Color<Button color="teal">Button</Button>
greenGreen<Button color="green">Button</Button>
redred<Button color="red">Button</Button>
tomatotomato<Button color="tomato">Button</Button>
orangeOrange Color<Button color="orange">Button</Button>
purplePurple Color<Button color="purple">Button</Button>
pinkPink Color<Button color="pink">Button</Button>
grayNeutral Color<Button color="gray">Button</Button>

Combining Properties

You can combine different properties to create custom buttons:

<Button size="5" color="accent" variant="outline" radius="full">
  Custom Button
</Button>

This will create a medium-sized, accent-colored outline button with fully rounded corners.