Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Tweakpane

useTweakpane(label, schema) registers tweakable parameters in a pane fixed to the top-right of the player. When the component unmounts, its folder is removed.

Basic usage

import { useTweakpane } from 'egaki/video' export function MyComponent(props) { const tp = useTweakpane('MyComponent', { blur: { value: props.blur ?? 12, min: 0, max: 50, step: 0.5 }, visible: props.visible ?? true, label: props.label ?? 'Hello', color: props.color ?? '#ff0055', }) return ( <div style={{ filter: `blur(${tp.blur}px)`, color: tp.color }}> {tp.visible && tp.label} </div> ) }

Control types

Value typeUI control
number with { min, max, step }Slider
booleanCheckbox
stringText input
string starting with #Color picker
{ x, y } objectPoint 2D

Copy changes button

A Copy changes button at the top of the pane serializes all active component parameters as structured markdown. It includes the current frame, section heading, and only params that differ from their defaults.

Pattern: props as defaults

Do not destructure tweakpane-managed props. Pass them as defaults so the prop serves as the initial value and tweakpane overrides it live:
const tp = useTweakpane('Card', { borderRadius: { value: props.borderRadius ?? 16, min: 0, max: 50 }, opacity: { value: props.opacity ?? 1, min: 0, max: 1, step: 0.01 }, })