Skip to content

Components Overview

Velocity includes 55 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

31 components organized by subcategory: form, data-display, feedback, overlay, and more.

Layout Components

4 components: Header, Footer, ThemeToggle, Analytics.

Pattern Components

7 composed components: ContactForm, NewsletterForm, FormField, SearchInput, and more.

Blog Components

4 components: ArticleHero, BlogCard, ShareButtons, RelatedPosts.

Landing Components

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

SEO Components

3 components: SEO, JsonLd, Breadcrumbs.

CategoryCountDescription
UI Components31Button, Input, Card, Badge, Alert, etc. (organized by subcategory)
Layout Components4Header, Footer, ThemeToggle, Analytics
Pattern Components7ContactForm, NewsletterForm, FormField, SearchInput, etc.
Blog Components4ArticleHero, BlogCard, ShareButtons, RelatedPosts
Landing Components5Hero, CTA, FeatureTabs, etc.
SEO Components3SEO, JsonLd, Breadcrumbs
Hero Components1Hero section
Total55All components across categories
---
import { Button, Card } from '@/components/ui';
---
<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>