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.12345678910111213141516import { 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> ) }
| Value type | UI control |
number with { min, max, step } | Slider |
boolean | Checkbox |
string | Text input |
string starting with # | Color picker |
{ x, y } object | Point 2D |
1234const tp = useTweakpane('Card', { borderRadius: { value: props.borderRadius ?? 16, min: 0, max: 50 }, opacity: { value: props.opacity ?? 1, min: 0, max: 1, step: 0.01 }, })