This document describes the available MDX components for use in blog posts.
The MDX Component Registry provides a curated set of React components that content authors can use directly in MDX files without importing. All components are validated at build time with helpful error messages.
Embeds a YouTube playlist with play controls and track list. Mirrors the existing playlist-style embed functionality.
Version: 1.0.0
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
playlistId |
string |
Yes | — | YouTube playlist ID (must start with "PL") |
title |
string |
No | "YouTube Playlist" |
Accessible title for iframe |
height |
number |
No | 400 |
Embed height in pixels (200-800) |
showTitle |
boolean |
No | true |
Whether to display playlist title |
autoplay |
boolean |
No | false |
Whether to autoplay first video |
Basic Usage
<PlaylistEmbed playlistId="PL2yQDdvlhXf8d-EXLaKIt-naTcllN5Gzt" />Embed a YouTube playlist with default settings.
Custom Height
<PlaylistEmbed playlistId="PL2yQDdvlhXf8d-EXLaKIt-naTcllN5Gzt" height={600} />Embed with a taller height for better visibility.
Autoplay Disabled Title
<PlaylistEmbed playlistId="PL2yQDdvlhXf8d-EXLaKIt-naTcllN5Gzt" showTitle={false} autoplay />Start playing automatically without showing the title.
When a YOUTUBE_API_KEY environment variable is configured, PlaylistEmbed displays:
- Playlist thumbnail
- Video count
- Channel name
- Playlist description
Without the API key, the basic YouTube embed is still fully functional.
To add a new component to the registry:
- Create the component in
apps/site-shell/components/mdx/registry/YourComponent/ - Define a Zod schema for prop validation
- Register it in
apps/site-shell/components/mdx/registry/registry.ts - Update this documentation
See quickstart.md for detailed instructions.
Cause: Component not registered in the registry.
Fix: Ensure the component is registered in registry.ts and exported correctly.
Cause: Invalid playlist ID or validation error.
Fix: Verify the playlist ID starts with "PL" and is a valid YouTube playlist ID.
Cause: Syntax error or invalid props in MDX file.
Fix: Check the build logs for the specific file and line number, then verify the component props match the schema.