Skip to content

UI Components Overview

UI components are the building blocks of your interface. They’re designed to be composable, accessible, and customizable through props.

ComponentPurpose
Button.astroClickable actions with multiple variants
Input.astroText input with label, hint, and error states
Textarea.astroMulti-line text input
Select.astroDropdown select menu
Checkbox.astroCheckbox input with label
Radio.astroRadio button for single selection
ComponentPurpose
Card.astroContainer with structured content
Badge.astroStatus labels and tags
Alert.astroContextual feedback messages
Avatar.astroUser profile images
Skeleton.astroLoading placeholders
Icon.astroSVG icon component
Logo.astroBrand logo with variants
ComponentPurpose
Dialog.astroModal dialogs
Dropdown.astroDropdown menus
Tooltip.astroHover tooltips
Tabs.astroHorizontal tab navigation
VerticalTabs.astroVertical tab navigation
ComponentPurpose
CodeBlock.astroSyntax-highlighted code
CTA.astroCall-to-action buttons
SocialProof.astroTestimonial cards
NpmCopyButton.astroNPM install command copier
TerminalDemo.tsxAnimated terminal demo

Most UI components share these patterns:

Visual style options:

<Button variant="primary">Primary</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="outline">Outline</Button>
<Button variant="ghost">Ghost</Button>

Size options (usually sm, md, lg):

<Button size="sm">Small</Button>
<Button size="md">Medium</Button>
<Button size="lg">Large</Button>

For dark backgrounds:

<Button colorScheme="invert">On Dark</Button>
---
import Button from '@/components/ui/Button.astro';
import Input from '@/components/ui/Input.astro';
import Card from '@/components/ui/Card.astro';
---
<Card>
<Input label="Email" name="email" type="email" />
<Button>Submit</Button>
</Card>