Skip to content

Components

The theme ships 17 Astro components across five categories: layout shells, content sections, marketing blocks, portfolio, and documentation. Import them individually from the package.

Full page shell with a sticky header (logo badge, nav links, GitHub/npm buttons) and footer. Wrap all your page content inside this component.

---
import BaseLayout from '@mcptoolshop/site-theme/components/BaseLayout.astro';
---
<BaseLayout title="My Tool" description="..." logoBadge="MT" brandName="my-tool" repoUrl="..." footerText="MIT">
<!-- page content -->
</BaseLayout>
PropTypeRequiredDescription
titlestringyesPage <title>
descriptionstringyesMeta description
logoBadgestringyes1-2 character badge (e.g. "RS")
brandNamestringyesName displayed in header
nav{ href, label }[]noAnchor nav links (defaults to [])
repoUrlstringyesGitHub repo URL
npmUrlstringnonpm package URL
footerTextstringyesFooter text (HTML allowed)

Two-column layout with a collapsible sidebar on mobile and a sticky sidebar on desktop. Used by the docs template.

---
import DocLayout from '@mcptoolshop/site-theme/components/DocLayout.astro';
---
<DocLayout sidebar={sidebarGroups} currentPath={Astro.url.pathname}>
<!-- main content -->
</DocLayout>
PropTypeRequiredDescription
sidebarSidebarGroup[]yesNavigation groups for the sidebar
currentPathstringyesCurrent page path for active link highlighting

Gradient hero section with a status badge, large headline, call-to-action buttons, and optional code preview cards.

PropTypeRequiredDescription
badgestringyesStatus badge text
headlinestringyesMain headline
headlineAccentstringyesMuted suffix after headline
descriptionstringyesDescription (HTML allowed)
primaryCta{ href, label }yesPrimary button
secondaryCta{ href, label }yesSecondary button
previews{ label, code }[]noCode preview cards

Anchor section wrapper with a heading and optional subtitle. Content goes in the default slot.

PropTypeRequiredDescription
idstringyesAnchor ID for navigation
titlestringyesSection heading
subtitlestringnoText below the heading

Three-column responsive card grid. Each card displays a bold title and a short description.

PropTypeRequiredDescription
features{ title, desc }[]yesArray of features

Grid-based bordered table. The first cell in each row is styled as a row header.

PropTypeRequiredDescription
columnsstring[]yesColumn headers
rowsstring[][]yesRow data

Two-column grid of dark code block cards. Each card has a title and a code snippet.

PropTypeRequiredDescription
cards{ title, code }[]yesArray of code cards

Full-width stacked API reference cards. Each card displays a monospace signature with a description below.

PropTypeRequiredDescription
apis{ signature, description }[]yesArray of API entries

Anchor-linked content block that renders HTML content via Astro’s set:html directive. Used by the docs template for rich content sections.

PropTypeRequiredDescription
idstringyesAnchor ID for navigation
titlestringyesSection heading (linkable)
contentstringyesHTML content (rendered via set:html)

Stats bar with an optional headline and value/label pairs. Used by the product template for trust signals.

PropTypeRequiredDescription
headlinestringnoText above the stats
stats{ value, label }[]noArray of stat entries

Responsive pricing tier cards. One tier can be marked as highlighted to show a “Popular” badge. Used by the product template.

PropTypeRequiredDescription
tiersPricingTier[]noArray of pricing tiers

PricingTier shape:

FieldTypeRequiredDescription
namestringyesTier name (e.g. “Free”, “Pro”)
pricestringyesPrice display (e.g. “$0”, “$29/mo”)
descriptionstringyesShort description
featuresstring[]yesFeature list items
cta{ href, label }yesCall-to-action button
highlightedbooleannoShow “Popular” badge if true

Two-column grid of quote cards with author info. Falls back to initials when no avatar URL is provided.

PropTypeRequiredDescription
testimonialsTestimonialDef[]noArray of testimonial entries

TestimonialDef shape:

FieldTypeRequiredDescription
quotestringyesThe testimonial text
authorstringyesAuthor name
rolestringyesAuthor role or title
avatarUrlstringnoAvatar image URL

Full-width gradient call-to-action banner with headline, optional description, and a button.

PropTypeRequiredDescription
headlinestringyesBanner headline
descriptionstringnoText below the headline
cta{ href, label }yesCall-to-action button

Client-side search and tag filtering bar. Works with PortfolioGrid — filters elements matching [data-portfolio-card] by reading data-tags and data-search-text attributes.

PropTypeRequiredDescription
tagsstring[]yesAvailable tags for filter buttons
searchablebooleannoShow text search input (default: true)
searchPlaceholderstringnoSearch input placeholder text

Configurable card grid for collections of any content type. Supports category grouping, status badges, images or badge fallbacks, tags, metadata, and secondary action links.

PropTypeRequiredDescription
itemsPortfolioItem[]yesArray of items to display
columns2 | 3 | 4noGrid columns on large screens (default: 3)
groupByCategorybooleannoGroup items under category headings (default: false)

PortfolioItem shape:

FieldTypeRequiredDescription
titlestringyesDisplay title
descriptionstringyesShort description
hrefstringyesPrimary link (card click target)
imagestringnoCard thumbnail URL
badgestringno1-2 char fallback when no image
tagsstring[]noTags for filtering
categorystringnoCategory for grouping
statusstringnoStatus label (stable, beta, new, archived)
metastringnoSecondary metadata line
secondaryAction{ href, label }noSecondary action link

Grouped navigation list with active-link highlighting. Used inside DocLayout.

PropTypeRequiredDescription
groupsSidebarGroup[]yesNavigation groups with title and items
currentPathstringnoCurrent page path for active highlighting

SidebarGroup shape: { title: string, items: { label: string, href: string }[] }

On-page heading navigation. Renders a bordered list of heading links indented by depth.

PropTypeRequiredDescription
headings{ text, id, depth: 2 | 3 }[]noArray of page headings for TOC