Skip to content

Components Reference

Complete reference for all UI components available in the application.

The base layout wrapper for all pages.

---
import BaseLayout from '@/layouts/BaseLayout.astro'
---
<BaseLayout title="Page Title" description="Page description">
<!-- Page content -->
</BaseLayout>
PropTypeRequiredDescription
titlestringYesPage title
descriptionstringNoPage meta description
ogImagestringNoOpen Graph image URL

Displays the current user status and auth controls.

---
import User from '@/components/Auth/User.astro'
---
<User />

No props required - automatically detects session state.

Wraps content that requires authentication.

---
import ProtectedRoute from '@/components/Auth/ProtectedRoute.astro'
---
<ProtectedRoute requiredGroups={['members']}>
<!-- Protected content -->
</ProtectedRoute>
PropTypeRequiredDescription
requiredGroupsstring[]NoRequired user groups
redirectTostringNoRedirect URL if unauthorized

Standard button component with variants.

---
import Button from '@/components/UI/Button.astro'
---
<Button variant="primary" size="lg">
Click me
</Button>
PropTypeDefaultDescription
variant'primary' | 'secondary' | 'danger''primary'Button style variant
size'sm' | 'md' | 'lg''md'Button size
disabledbooleanfalseDisabled state
type'button' | 'submit' | 'reset''button'Button type

Container component with optional header and footer.

---
import Card from '@/components/UI/Card.astro'
---
<Card title="Card Title">
<div slot="header">Optional header content</div>
Main card content
<div slot="footer">Optional footer content</div>
</Card>
PropTypeRequiredDescription
titlestringNoCard title
variant'default' | 'bordered'NoCard style variant
  • header - Optional header content
  • default - Main card content
  • footer - Optional footer content

Text input component with validation support.

---
import Input from '@/components/Forms/Input.astro'
---
<Input
name="email"
type="email"
label="Email Address"
required
placeholder="user@example.com"
/>
PropTypeRequiredDescription
namestringYesInput name attribute
typestringNoInput type
labelstringNoInput label
placeholderstringNoPlaceholder text
requiredbooleanNoRequired field
errorstringNoError message

Theme switcher component.

---
import ThemeToggle from '@/components/Shared/ThemeToggle.astro'
---
<ThemeToggle />

No props required - automatically manages theme state.