Skip to content
H Hans Martens
astro-rocket components ui velocity

57 Components Ready to Use — Astro Rocket's Full UI Library

Astro Rocket ships with 57 production-ready components from the Velocity library — buttons, cards, dialogs, forms, data display, and full page-structure components. All accessible, all themed.

H

Hans Martens

2 min read

Astro Rocket inherits a complete UI component library from Velocity by Southwell Media. That means 57 production-ready components are available the moment you install the theme — no npm packages to install, no extra setup. Every component is already styled with the design system’s color tokens, so they adapt automatically when you switch themes or toggle dark mode.

See every component live: demo.deployvelocity.com/components

The library is organized in three layers: 31 UI primitives that form the building blocks, 7 higher-level pattern components, and a set of page-structure components for the Hero, Header, Footer, Blog, and SEO layers.


UI primitives

These 31 components cover every common UI need. They accept variants and sizes through props and are built with accessibility in mind — keyboard navigation, ARIA attributes, and focus management are handled for you.

Form (7 components)

The form layer covers every standard input type.

ComponentWhat it does
ButtonPrimary interactive element. Supports variant (brand, secondary, outline, ghost, destructive) and size (sm, md, lg). Works as a <button> or renders as an <a> when an href is provided.
InputSingle-line text input with label, helper text, and error state support.
TextareaMulti-line text input with the same label/error pattern as Input.
SelectStyled native select element with the same form field pattern.
CheckboxAccessible checkbox with custom styling that follows the active theme.
RadioRadio button with the same theming as Checkbox.
SwitchToggle switch for on/off states, with smooth CSS transition.
---
import Button from '@/components/ui/form/Button/Button.astro';
import Input from '@/components/ui/form/Input/Input.astro';
---

<Button variant="brand" size="md">Get started</Button>
<Button variant="outline" size="md">Learn more</Button>

<Input label="Email address" type="email" placeholder="you@example.com" />

Data display (8 components)

ComponentWhat it does
CardContainer with border and rounded corners. Use it for any grouped content block.
BadgeSmall inline label. Supports variant (brand, secondary, success, warning, destructive) and pill prop for rounded style.
AvatarCircular image or initials fallback.
AvatarGroupStacked row of Avatars for team or contributor lists.
TableStyled HTML table with header, body, and striped row support.
PaginationPage navigation with prev/next and numbered page buttons.
ProgressHorizontal progress bar that fills to a percentage value.
SkeletonLoading placeholder that pulses in the shape of the content it replaces.
---
import Badge from '@/components/ui/data-display/Badge/Badge.astro';
import Card from '@/components/ui/data-display/Card/Card.astro';
---

<Badge variant="brand" pill>New</Badge>
<Badge variant="success">Active</Badge>

<Card>
  <p>Any content goes here.</p>
</Card>

Feedback (3 components)

ComponentWhat it does
AlertInline message for info, success, warning, or error states.
ToastTemporary notification that appears in the corner of the screen and auto-dismisses.
TooltipText label that appears on hover or focus above any element.

Overlay (6 components)

ComponentWhat it does
AccordionCollapsible content panels — any number of items, only one open at a time.
DialogModal window with backdrop, focus trapping, and keyboard close.
DropdownFloating menu that opens below a trigger button.
TabsHorizontal tab bar that switches between content panels.
VerticalTabsSame as Tabs but with the tab list on the left. Good for settings panels.
ConsentBannerCookie consent banner with accept/decline actions.
---
import Accordion from '@/components/ui/overlay/Accordion/Accordion.astro';
---

<Accordion items={[
  { title: 'What is Astro Rocket?', content: 'A production-ready Astro 6 theme.' },
  { title: 'Is it free?', content: 'Yes. MIT licensed.' },
]} />

Layout & content (3 components)

ComponentWhat it does
IconUnified icon component. Covers 350+ Lucide UI icons and 3,000+ Simple Icons brand icons via Iconify.
SeparatorHorizontal or vertical divider line.
CodeBlockSyntax-highlighted code block with copy button and language label.

The Icon component is used throughout the theme. You reference any Lucide icon by name, or any Simple Icons brand icon with the si- prefix:

---
import Icon from '@/components/ui/primitives/Icon/Icon.astro';
---

<Icon name="arrow-right" size="sm" />
<Icon name="si-github" size="md" />

Marketing UI (5 components)

These are UI-level marketing components, distinct from the full landing-page section components below.

ComponentWhat it does
CTACall-to-action block with heading, description, and button.
LogoAuto-generated logo badge — the first letter of your site name on the active brand color. Updates live on theme switch.
SocialProofAvatar stack plus a short proof statement (e.g., “Join 2,000+ developers”).
NpmCopyButtonOne-click npm install command with copy icon — useful for open-source project pages.
TerminalDemoAnimated terminal window showing a sequence of commands.

Pattern components

Pattern components compose the UI primitives into specific real-world use cases. They are higher-level and more opinionated.

ComponentWhat it does
ContactFormFull contact form connected to Resend. Server-side Zod validation and honeypot spam protection included.
NewsletterFormEmail capture form, also connected to Resend.
StatCardMetric display card with a large number, label, and optional trend indicator. Used on dashboard or about pages.
EmptyStatePlaceholder for empty lists or zero-result searches. Accepts icon, heading, description, and action button.
FormFieldShared label + input + error wrapper used internally by all form components.
SearchInputInput with a search icon and clear button.
PasswordInputInput with a show/hide password toggle.

Page-structure components

These components are fixed parts of the site architecture. They are used once per page type and are not generally composed with other components — they define the page.

Hero — the Hero component supports four layouts (centered, split, minimal, card) and three sizes. All hero content uses named slots: badge, title, description, actions, and optionally image.

Header — fixed top navigation bar with logo, nav links, dark mode toggle, theme selector, and optional CTA button. Three rendering variants: solid (solid bar), transparent (transparent, used on blog posts), and floating (the capsule header on the homepage). Includes the scroll progress bar when enabled.

Footer — bottom navigation with site links, social icons, and copyright text.

Breadcrumbs — auto-generated from the current URL path. Used at the top of blog posts and inner pages.

ThemeToggle / ThemeSelector — dark/light mode toggle and the live theme switcher pill button with 6-colour dropdown.

Blog componentsBlogCard (post listing card with cover image, tags, and reading time), ArticleHero (full-width post header with cover image and metadata), RelatedPosts (three-card section at the bottom of every post), ShareButtons (Twitter/X, LinkedIn, clipboard copy), and BlogImageSVG (the brand-color SVG backgrounds for post covers).

Landing page sectionsCredibility (logo bar), FeatureTabs (interactive tabbed feature showcase), LighthouseScores (animated score dials), and TechStack (technology badge strip).

SEOSEO (all meta tags, Open Graph, Twitter Cards), JsonLd (structured data for WebSite, Organization, BlogPosting, Breadcrumb, FAQ), and Analytics (analytics script slot).


Everything responds to the active theme

Every component uses the design system’s CSS color tokens — --color-brand-500, --color-foreground, --color-background, and so on. Switch from Emerald to Purple and every button, badge, progress bar, and focus ring updates instantly. No component has a hardcoded brand color.

The same applies to dark mode: all token values change when the dark class is toggled on <html>, and every component updates without any extra code.


Adding your own components

When you need something that isn’t in the library, Velocity’s component documentation describes exactly how to create new components that fit the existing patterns.

Where to put it

Place new components in the matching subdirectory under src/components/:

src/components/
├── ui/
│   ├── form/          # Button, Input, Select, Checkbox, Radio, Switch, Textarea
│   ├── data-display/  # Card, Badge, Avatar, Table, Pagination, Progress, Skeleton
│   ├── feedback/      # Alert, Toast, Tooltip
│   ├── overlay/       # Dialog, Dropdown, Tabs, VerticalTabs, Accordion
│   ├── layout/        # Separator
│   ├── primitives/    # Icon
│   ├── content/       # CodeBlock
│   └── marketing/     # Logo, CTA, NpmCopyButton, SocialProof, TerminalDemo
├── patterns/          # Composed patterns (ContactForm, SearchInput, etc.)
├── layout/            # Page structure (Header, Footer)
├── blog/              # Blog-specific
└── landing/           # Marketing pages

Basic component structure

A typical UI component defines its props in the frontmatter, maps variants to class strings, and uses class:list to compose the final class:

---
interface Props {
  variant?: 'default' | 'primary' | 'success';
  size?: 'sm' | 'md';
  class?: string;
}

const {
  variant = 'default',
  size = 'md',
  class: className = '',
} = Astro.props;

const variants = {
  default: 'bg-background-secondary text-foreground',
  primary:  'bg-primary text-primary-foreground',
  success:  'bg-success-light text-success-foreground',
};

const sizes = {
  sm: 'px-2 py-0.5 text-xs',
  md: 'px-3 py-1 text-sm',
};
---
<span
  class:list={[
    'inline-flex items-center rounded-full font-medium',
    variants[variant],
    sizes[size],
    className,
  ]}
>
  <slot />
</span>

Three rules to follow

Use design tokens, not hardcoded values. Every built-in component uses bg-background, text-foreground, border-border, and the brand tokens. If you hardcode bg-white or text-gray-900, your component will break in dark mode and ignore the active colour theme.

Support named slots for flexible content. Slots let the consumer pass in icons, actions, or footer content without the component needing to know about them:

<FeatureCard title="Fast">
  <Icon name="zap" slot="icon" />
  Lightning quick builds.
  <Button slot="footer">Learn more</Button>
</FeatureCard>

Use React for interactivity. Astro components are server-rendered and have no client-side state. For anything that needs useState, onClick, or real-time updates, create a .tsx file and use the client:visible directive when you include it:

---
import { Counter } from '@/components/ui';
---
<Counter client:visible />

Browse the live demo

The fastest way to get a feel for all 57 components is the Velocity component demo. Every component is rendered with live props you can inspect:

demo.deployvelocity.com/components

The demo is Velocity’s own showcase. All 57 components shown there are included in Astro Rocket unchanged — same markup, same variants, same props.

Back to Blog
Share:

Related Posts

Animations in Astro Rocket — Every Effect Explained

A complete breakdown of every animation built into Astro Rocket — page transitions, scroll-triggered counters, the reactive header, card hovers, and the full micro-animation library.

H Hans Martens
2 min read
astro-rocket animations components customization css

The Hero Typing Effect in Astro Rocket — How It Works and How to Tune It

Astro Rocket's hero headline cycles through words with a typing animation. Learn how it works, how to tune every speed and pause, and how to disable it entirely.

H Hans Martens
2 min read
astro-rocket components customization tutorial javascript

Scroll Progress Bar — Reading Progress at a Glance

Astro Rocket now has a scroll progress bar: a thin brand-coloured line that fills as you scroll. Here's how it works, where it lives, and how to enable it on any page.

H Hans Martens
2 min read
astro-rocket features header ux

Follow along

Stay in the loop — new articles, thoughts, and updates.