Skip to content

YouTube

The <ShowcaseYouTube> component can be used to showcase YouTube videos.

import { ShowcaseYouTube } from 'starlight-showcases'

Specify a list of YouTube videos to display using the entries prop. Each entry should at least specify a title and link to the video while an optional description can be provided.

src/content/docs/showcase.mdx
import { ShowcaseYouTube } from 'starlight-showcases'
<ShowcaseYouTube
entries={[
{
href: 'https://www.youtube.com/watch?v=5u0Ds7wzUeI',
title: 'Starlight by Astro',
},
{
href: 'https://www.youtube.com/watch?v=TtRtkTzHVBU',
title: 'The Astro Community',
},
]}
/>
Preview

Starlight by Astro

The Astro Community

The <ShowcaseYouTube> component accepts the following props:

required
type: ShowcaseYouTubeCardProps[]

The list of YouTube videos to display. See the Usage section for an example and the entry definition for more details.

Each YouTube video entry should be an object with the following properties:

required
type: string

The link to the YouTube video to showcase.

required
type: string

The title of the YouTube video.

type: string

An optional description for the YouTube video.