Skip to content

Components Overview

Velocity includes 56 components organized by purpose.

  1. Astro-first — Components work without client JavaScript
  2. Composable — Small, single-purpose primitives
  3. Accessible — WCAG 2.2 AA compliant
  4. Token-based — No hardcoded colors/sizes
  5. Variant-rich — Multiple visual options per component

UI Components

33 primitive components: Button, Input, Card, Badge, Alert, and more.

Layout Components

4 components: Header, Footer, ThemeToggle, Analytics.

Pattern Components

3 composed components: ContactForm, NewsletterForm, FormField.

Blog Components

4 components: ArticleHero, BlogCard, ShareButtons, RelatedPosts.

Landing Components

7 components: Hero, CTA, FeatureTabs, Credibility, and more.

SEO Components

3 components: SEO, JsonLd, Breadcrumbs.

CategoryCountDescription
UI Components33Button, Input, Card, Badge, Alert, etc.
Layout Components4Header, Footer, ThemeToggle, Analytics
Pattern Components3ContactForm, NewsletterForm, FormField
Blog Components4ArticleHero, BlogCard, ShareButtons, RelatedPosts
Landing Components7Hero, CTA, FeatureTabs, etc.
SEO Components3SEO, JsonLd, Breadcrumbs
Hero Components2Hero variants
Total56
---
import Button from '@/components/ui/Button.astro';
import Card from '@/components/ui/Card.astro';
---
<Button>Click me</Button>
<Card>Content</Card>

All components use the @/ alias pointing to src/:

// tsconfig.json
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
}
}

Most components accept variant and size props:

<Button variant="primary" size="lg">Large Primary</Button>
<Button variant="outline" size="sm">Small Outline</Button>

For components on dark backgrounds:

<Button colorScheme="invert">On Dark Background</Button>

Some components support responsive variants:

<Card padding={{ base: 'md', lg: 'lg' }}>
Responsive padding
</Card>