All components

Component Playground

A component for displaying a component playground

Default
Default component playground

Hover to energize

Electric border card

arcColor tints the lightning; accentColor tints the hover shadow and glow.

1"use client";
2
3import { ElectricBorderCardDefaultExample } from "../electric-border-card";
4
5export function ComponentPlaygroundDefaultExample() {
6 return (
7 <div className="mx-auto w-full max-w-4xl">
8 <ElectricBorderCardDefaultExample />
9 </div>
10 );
11}

Controls

arcColor
accentColor
radius
volumetricShadow

Installation & source

Install via the shadcn CLI or copy the registry files manually.

bash
npx shadcn@latest add @tt-ui/component-playground

Props

NameTypeDefaultDescription
controlsRecord<string, PlaygroundControlConfig>undefinedLive playground props; omit (or use an empty object) to hide the controls toolbar toggle and panel so children render exactly as authored-useful for fixed assets or non-interactive previews
controlsEnabledbooleantrueQuickly turn controls behavior on/off without removing `controls`; when false, preview renders as static
showPreviewResetbooleanfalseShows Reset animation in the toolbar; remounts the preview so motion / in-view demos can run again
dynamicCodebooleantrueWhen at least one control is configured, rewrites the root JSX snippet in the Code tab from the static `code` template using the current values (falls back to `code` if parsing fails); ignored when `controls` is omitted
defaultControlsOpenbooleantrueWhen live controls are present, whether the controls block under the preview starts visible; hiding it does not reset control values
controlsVisibilityToggle"switch" | "checkbox""switch"When live controls are present, toolbar control used to show or hide the controls section
embeddedbooleanfalseSofter outer chrome when nested in docs cards or other containers