Astro Components
Accordion
AstroZero-JS accordion using native details/summary elements. The chevron animates via CSS only.
Is it accessible?
Is it styled?
Is it animated?
View code
import Accordion from '@/components/astro/Accordion.astro';
<Accordion items={[
{ title: 'Is it accessible?', content: 'Yes. It uses native <details>/<summary> HTML.' },
{ title: 'Is it styled?', content: 'Yes. It comes with default styles.' },
{ title: 'Is it animated?', content: 'Yes. The chevron rotates via CSS.' },
]} /> Badge
AstroDisplays a badge or a component that looks like a badge.
View code
import Badge from '@/components/astro/Badge.astro';
<Badge>Default</Badge>
<Badge variant="secondary">Secondary</Badge>
<Badge variant="destructive">Destructive</Badge>
<Badge variant="outline">Outline</Badge> Card
AstroDisplays a card with header, content, and footer.
Notification
You have 3 unread messages.
Your trial ends in 3 days. Upgrade to keep your data.
View code
import Card from '@/components/astro/Card.astro';
import CardHeader from '@/components/astro/CardHeader.astro';
import CardTitle from '@/components/astro/CardTitle.astro';
import CardDescription from '@/components/astro/CardDescription.astro';
import CardContent from '@/components/astro/CardContent.astro';
import CardFooter from '@/components/astro/CardFooter.astro';
<Card>
<CardHeader>
<CardTitle>Title</CardTitle>
<CardDescription>Description</CardDescription>
</CardHeader>
<CardContent>Content</CardContent>
<CardFooter>Footer</CardFooter>
</Card> Alert
AstroDisplays a callout for user attention.
Information
Error
View code
import Alert from '@/components/astro/Alert.astro';
import AlertTitle from '@/components/astro/AlertTitle.astro';
import AlertDescription from '@/components/astro/AlertDescription.astro';
<Alert>
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>You can add components.</AlertDescription>
</Alert> Avatar
AstroAn image element with a fallback for representing the user.
MK TZ PQ View code
import Avatar from '@/components/astro/Avatar.astro';
<Avatar src="/photo.jpg" alt="Jane Doe" fallback="JD" />
<Avatar fallback="AB" />
<Avatar fallback="TZ" size="lg" /> Separator
AstroVisually or semantically separates content.
Radix Primitives
An open-source UI component library.
View code
import Separator from '@/components/astro/Separator.astro';
<Separator />
<Separator orientation="vertical" class="h-6" /> Skeleton
AstroUse to show a placeholder while content is loading.
View code
import Skeleton from '@/components/astro/Skeleton.astro';
<Skeleton class="h-4 w-48" />
<Skeleton class="h-12 w-12 rounded-full" /> Progress
AstroDisplays an indicator showing the completion progress of a task.
View code
import Progress from '@/components/astro/Progress.astro';
<Progress value={60} />
<Progress value={25} class="h-2" /> Input
AstroDisplays a form input field.
View code
import Input from '@/components/astro/Input.astro';
<Input type="text" placeholder="Email address" />
<Input type="password" placeholder="Password" /> Textarea
AstroDisplays a form textarea.
View code
import Textarea from '@/components/astro/Textarea.astro';
<Textarea placeholder="Tell us about yourself..." /> Label
AstroRenders an accessible label associated with controls.
View code
import Label from '@/components/astro/Label.astro';
import Input from '@/components/astro/Input.astro';
<Label for="email">Email</Label>
<Input id="email" type="email" placeholder="you@example.com" /> Table
AstroA responsive table component.
| Invoice | Status | Method | Amount |
|---|---|---|---|
| INV-001 | Paid | Credit Card | $250.00 |
| INV-002 | Pending | PayPal | $150.00 |
| INV-003 | Unpaid | Bank Transfer | $350.00 |
View code
import Table from '@/components/astro/Table.astro';
<Table
columns={[
{ key: 'invoice', header: 'Invoice' },
{ key: 'status', header: 'Status' },
{ key: 'amount', header: 'Amount' },
]}
rows={[
{ invoice: 'INV-001', status: 'Paid', amount: '$250.00' },
]}
/> Checkbox
AstroA control that allows the user to toggle between checked and not checked.
View code
import Checkbox from '@/components/astro/Checkbox.astro';
import Label from '@/components/astro/Label.astro';
<div class="flex items-center gap-2">
<Checkbox id="terms" name="terms" />
<Label for="terms">Accept terms and conditions</Label>
</div> Select
AstroStyled native select element. The dropdown panel is OS-styled — for a fully custom dropdown, use the React shadcn/ui version.
View code
import Select from '@/components/astro/Select.astro';
import Label from '@/components/astro/Label.astro';
<Label for="framework">Framework</Label>
<Select
id="framework"
name="framework"
placeholder="Select a framework…"
options={[
{ value: 'astro', label: 'Astro' },
{ value: 'next', label: 'Next.js' },
{ value: 'remix', label: 'Remix' },
]}
/> React Required
Use via shadcn/ui React componentsAlert Dialog
ReactRequires JavaScript & React for interactivity
View Alert Dialog on shadcn/uiCalendar
ReactRequires JavaScript & React for interactivity
View Calendar on shadcn/uiCarousel
ReactRequires JavaScript & React for interactivity
View Carousel on shadcn/uiCheckbox
ReactRequires JavaScript & React for interactivity
View Checkbox on shadcn/uiCollapsible
ReactRequires JavaScript & React for interactivity
View Collapsible on shadcn/uiCommand
ReactRequires JavaScript & React for interactivity
View Command on shadcn/uiDialog
ReactRequires JavaScript & React for interactivity
View Dialog on shadcn/uiDrawer
ReactRequires JavaScript & React for interactivity
View Drawer on shadcn/uiForm
ReactRequires JavaScript & React for interactivity
View Form on shadcn/uiHover Card
ReactRequires JavaScript & React for interactivity
View Hover Card on shadcn/uiInput OTP
ReactRequires JavaScript & React for interactivity
View Input OTP on shadcn/uiPopover
ReactRequires JavaScript & React for interactivity
View Popover on shadcn/uiRadio Group
ReactRequires JavaScript & React for interactivity
View Radio Group on shadcn/uiResizable
ReactRequires JavaScript & React for interactivity
View Resizable on shadcn/uiScroll Area
ReactRequires JavaScript & React for interactivity
View Scroll Area on shadcn/uiSelect
ReactRequires JavaScript & React for interactivity
View Select on shadcn/uiSheet
ReactRequires JavaScript & React for interactivity
View Sheet on shadcn/uiSlider
ReactRequires JavaScript & React for interactivity
View Slider on shadcn/uiSonner
ReactRequires JavaScript & React for interactivity
View Sonner on shadcn/uiSwitch
ReactRequires JavaScript & React for interactivity
View Switch on shadcn/uiTabs
ReactRequires JavaScript & React for interactivity
View Tabs on shadcn/uiToast
ReactRequires JavaScript & React for interactivity
View Toast on shadcn/uiToggle
ReactRequires JavaScript & React for interactivity
View Toggle on shadcn/uiToggle Group
ReactRequires JavaScript & React for interactivity
View Toggle Group on shadcn/uiTooltip
ReactRequires JavaScript & React for interactivity
View Tooltip on shadcn/uiReady to use in your Astro project?
Pick your theme above, download the CSS, drop the component files into your project, and you're done.