Fast
Built for speed.
MDX extends Markdown with JSX component support. Starlight provides a rich set of built-in components that make documentation interactive without writing custom code.
Starlight ships components for tabs, cards, asides, badges, and more. Import them from @astrojs/starlight/components and use them directly in your content.
Here is a tabbed install guide:
bash npm install my-package bash pnpm add my-package bash yarn add my-package MDX uses JSX syntax inside Markdown. Components are imported at the top and used as tags throughout the content:
---title: Install Guide---
import { Tabs, TabItem } from "@astrojs/starlight/components";
<Tabs> <TabItem label="npm">npm install my-package</TabItem> <TabItem label="pnpm">pnpm add my-package</TabItem></Tabs>Live example with cards:
Fast
Built for speed.
Safe
Secure by default.
Highlights:
[text](url) work everywhere — no need to drop into HTML <a> tags..mdx files.This is MDX’s strongest practical advantage for developer-authored docs:
.mdx files natively with syntax highlightingMDX files can leverage TypeScript-aware tooling. A typo like <Aside type="warningg"> gets flagged by your editor before you even build. Component props are typed, so you get autocomplete for valid values.
MDX supports importing any Astro, React, Solid, or Vue component. This means custom interactive widgets — charts, demos, embedded tools — work with a simple import:
import MyChart from "../../components/MyChart.astro";
<MyChart data={[1, 2, 3]} />The component handles hydration and rendering. The content author just imports and uses it.
Imports
Components are imported explicitly at the top of each file. Clear dependencies, no magic.
Syntax
JSX mixed with Markdown. Familiar to anyone who writes React, Solid, or Vue.
Editor Support
Full syntax highlighting, autocomplete, go-to-definition, and error checking in VS Code and other editors.
Type Safety
TypeScript-aware tooling catches prop errors and missing imports before build time.