Multiple Embed Types
Choose between stream-only, chat-only, or combined view
Seamlessly embed Twitch streams and chat into your documentation with our custom Twitch component.
Watch live!
Multiple Embed Types
Choose between stream-only, chat-only, or combined view
Theme Support
Automatic theme detection or manual dark/light selection
Interactive Controls
Built-in controls for mute, chat toggle, and fullscreen
Accessibility
Full ARIA support and keyboard navigation
Display both the stream and chat side-by-side for full engagement:
<TwitchEmbed channel="kbve" type="both" theme="auto"/>Embed just the video stream without chat:
<TwitchEmbed channel="xqc" type="stream" theme="auto"/>Show only the chat for text-based interaction:
<TwitchEmbed channel="hasanabi" type="chat" theme="auto" height={500}/>| Prop | Type | Default | Description |
|---|---|---|---|
channel | string | Required | Twitch channel username |
type | 'stream' | 'chat' | 'both' | 'both' | Type of embed to display |
theme | 'dark' | 'light' | 'auto' | 'auto' | Color theme |
width | number | string | '100%' | Width of the embed |
height | number | string | 500 | Height of the embed |
showControls | boolean | true | Show interactive controls overlay |
autoplay | boolean | false | Auto-play stream on load |
muted | boolean | true | Start stream muted |
aspect | string | 'aspect-video' | Aspect ratio CSS class |
| Prop | Type | Default | Description |
|---|---|---|---|
channel | string | Required | Twitch channel username |
theme | 'dark' | 'light' | 'auto' | 'auto' | Color theme |
height | number | string | 500 | Height of the chat |
darkpopout | boolean | true | Force dark popout mode |
---import TwitchEmbed from '@/components/twitch/TwitchEmbed.astro';---
<TwitchEmbed channel="ninja" />---import TwitchEmbed from '@/components/twitch/TwitchEmbed.astro';import TwitchChat from '@/components/twitch/TwitchChat.astro';---
<div class="space-y-4"> <TwitchEmbed channel="xqc" type="stream" autoplay={true} muted={true} />
<TwitchChat channel="xqc" height={400} /></div><TwitchEmbed channel="lirik" type="stream" aspect="aspect-video" showControls={true}/><TwitchEmbed channel="summit1g" type="both" theme="dark" height={600} muted={false}/>The Twitch embed component includes comprehensive accessibility support:
The Twitch embed component works in all modern browsers:
For advanced usage, you can interact with the component’s state:
// Access the Twitch serviceimport { twitchService } from '@/components/twitch/ServiceTwitch';
// Toggle chat visibilitytwitchService.toggleChat();
// Toggle mutetwitchService.toggleMute();
// Set volume (0-1)twitchService.setVolume(0.5);
// Toggle fullscreentwitchService.toggleFullscreen();