Skip to content
GitHub

Text Stroke

Text stroke effects to recreate retro style game indicators

+129 XP
import { TextStroke } from "@/components/ui/pxl/text-stroke";
export default function Preview() {
return (
<div className="w-full min-h-23 flex items-center justify-center">
<TextStroke variant="loot">+129 XP</TextStroke>
</div>
);
}
pnpm dlx shadcn@latest add pxl-ui/registry/text-stroke
import { TextStroke } from "@/components/ui/pxl/text-stroke"
<TextStroke variant="loot">+129 XP</TextStroke>

Use the variant prop to change the colors of the text.

BackgroundLootCryoFireToxicPlasmaShadowSynthwaveChrome
import { TextStroke } from "@/components/ui/pxl/text-stroke";
export default function Variants() {
return (
<div className="flex flex-wrap content-center justify-center gap-2">
<TextStroke variant="background">Background</TextStroke>
<TextStroke variant="loot">Loot</TextStroke>
<TextStroke variant="cryo">Cryo</TextStroke>
<TextStroke variant="fire">Fire</TextStroke>
<TextStroke variant="toxic">Toxic</TextStroke>
<TextStroke variant="plasma">Plasma</TextStroke>
<TextStroke variant="shadow">Shadow</TextStroke>
<TextStroke variant="synthwave">Synthwave</TextStroke>
<TextStroke variant="chrome">Chrome</TextStroke>
</div>
);
}