Controls
Vector pad
a 2D point: drag it, arrow it, or type x and y · y grows upwards
function Vec2PadDemo() { const [offset, setOffset] = React.useState<[number, number]>([0.25, -0.5]); return <Vec2Pad className={narrow} label="Light direction" value={offset} onChange={setOffset} />;}API
<Vec2Pad label value={[x, y]} onChange min? max? step? />Get it
Already in every copy of the web kit:
import { Vec2Pad } from '@/components/controls/vec2-pad';Details
- Exports
Vec2Pad- Packages
- cn@^0.5.2
- Installs with
- @halftone-web/lib-controls-scrub, @halftone-web/number-field
- Also searched as
- xy pad, point, offset, position, direction, joystick
- Registry JSON
- /r/web/vec2-pad.json
Agents: the whole registry is at /llms.txt.