Skip to content

Twitter

The <ShowcaseTwitter> component can be used to showcase Twitter (also known as X) posts or tweets.

import { ShowcaseTwitter } from 'starlight-showcases'

Specify a list of Twitter posts to display using the entries prop.

src/content/docs/showcase.mdx
import { ShowcaseTwitter } from 'starlight-showcases'
<ShowcaseTwitter
entries={[
'https://x.com/astrodotbuild/status/1791519480696168572',
'https://x.com/astrodotbuild/status/1726752143204393421',
]}
/>
Preview

The <ShowcaseTwitter> component uses Astro Embed to load a minimal version of Twitter’s widget with zero JavaScript and only static HTML content. To convert the widgets into interactive embeds, check out the Astro Embed “Loading Twitter’s JavaScript” guide.

The <ShowcaseTwitter> component accepts the following props:

required
type: string[]

The list of Twitter post URLs to display. See the Usage section for an example.