
About

About me
A caffeinated beverage.
About, Instagram, Twitter, Discord, subs, and donations. White field, black type, a colored mark beside each title, and the pine forest along the bottom. Download a PNG for each and upload them in Twitch’s About section.
Size
Still image, 320 × 400. Six panels. Upload each PNG in Twitch’s About section.
Twitch panels is a still 320 × 400 PNG. Six panels. Upload each PNG in Twitch’s About section.
example.tsx
import { TwitchPanels } from "@/components/stream/twitch-panels";
export function Overlay() {
return <TwitchPanels layout="desktop" />;
}Paste this URL into OBS or TikTok Live Studio. The query params match the props below.
browser-source.tsx
// Still Twitch panels, 320×400. Download the PNGs and upload them in the About section.
const src = "https://chandlerking.dev/live/twitch-panels?layout=desktop";Six footer-style panels in the same grid as the channel About page: about, Instagram, Twitter, Discord, subs, and donations. White field, black type, a colored mark beside each title, and the pine forest along the bottom.
| Prop | Type | Default | Notes |
|---|---|---|---|
| layout | "desktop" | "mobile" | Required | Accepted for the overlay switch. The panels themselves are a fixed 320×400. |
Rather than the browser source, copy Twitch panels into a project. Install its dependencies, then copy all 2 files into the matching path.
src/components/stream/twitch-panels.tsx
import { OverlayRoot } from "@/components/stream/overlay-root";
import { PANEL_MARK_SVG, type PanelMarkId } from "@/config/stream-panel-marks";
import { TWITCH_PANELS, type TwitchPanel } from "@/config/stream-panels";
import { footerConfig, siteConfig } from "@/config/site";
import type { StreamLayout } from "@/config/stream-components";
import styles from "./twitch-panels.module.css";
function hasLines(panel: TwitchPanel): panel is TwitchPanel & { lines: readonly string[] } {
return "lines" in panel;
}
const COFFEE = "/images/profile-stickers/coffee.webp";
function Mark({ id }: { id: TwitchPanel["id"] }) {
switch (id) {
case "about":
return (
// eslint-disable-next-line @next/next/no-img-element
<img
src={siteConfig.personal.avatar.src}
alt=""
className={styles.glyph}
draggable={false}
/>
);
case "donations":
return (
// eslint-disable-next-line @next/next/no-img-element
<img src={COFFEE} alt="" className={styles.glyph} draggable={false} />
);
case "instagram":
case "twitter":
case "discord":
case "subs":
return <Logo id={id} />;
default: {
const unreachable: never = id;
return unreachable;
}
}
}
function Logo({ id }: { id: PanelMarkId }) {
return <span className={styles.mark} dangerouslySetInnerHTML={{ __html: PANEL_MARK_SVG[id] }} />;
}
function Panel({ panel }: { panel: TwitchPanel }) {
return (
<article className={styles.panel}>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={footerConfig.artwork.src}
alt=""
width={footerConfig.artwork.width}
height={footerConfig.artwork.height}
draggable={false}
className={styles.forest}
/>
<div className={styles.content}>
<p className={styles.eyebrow}>{panel.eyebrow}</p>
<div className={styles.heading}>
<Mark id={panel.id} />
<h3 className={styles.title}>{panel.title}</h3>
</div>
{"body" in panel ? <p className={styles.body}>{panel.body}</p> : null}
{hasLines(panel) ? (
<div className={styles.card}>
{panel.lines.map((line) => (
<p key={line} className={styles.line}>
{line}
</p>
))}
</div>
) : null}
</div>
</article>
);
}
export function TwitchPanels({
layout,
}: {
layout: StreamLayout;
preview?: boolean;
}) {
return (
<OverlayRoot>
<div className={styles.set} data-layout={layout}>
{TWITCH_PANELS.map((panel) => (
<Panel key={panel.id} panel={panel} />
))}
</div>
</OverlayRoot>
);
}
src/components/stream/overlay-root.tsx
import type { ReactNode } from "react";
import { cn } from "@/lib/utils";
export function OverlayRoot({
children,
className,
}: {
children: ReactNode;
className?: string;
}) {
return (
<div
className={cn(
"@container relative h-full w-full overflow-hidden pointer-events-none",
className,
)}
>
{children}
</div>
);
}
Say hi, visitor 1,428