Controls
Control panel
an inspector drawn from a config ([default, min, max], a hex, a boolean, { type }, nested = a section) · Copy, Paste, Reset all
function ControlPanelDemo() { const c = useControls(CARD_CONFIG); return <ControlPanel className={narrow} title="Card" nodes={c.nodes} values={c.values} onChange={c.setValues} presets={CARD_PRESETS} />;}Usage
The property panel of a product that edits something (a theme studio, a type tester, an icon or poster tool). Not a settings form (Field, Input and Switch), and not a panel you add to tune a value and then remove (that is the tune-live skill). Write the config once as a module constant; its types pick the controls.
API
const c = useControls(config); <ControlPanel title nodes={c.nodes} values={c.values} onChange={c.setValues} presets? />Get it
Already in every copy of the web kit:
import { ControlPanel, useControls } from '@/components/controls/control-panel';Details
- Exports
ControlPanel,useControls- Packages
- cn@^0.5.2, lucide-react@^1.52.0
- Installs with
- @halftone-web/control-row, @halftone-web/control-section, @halftone-web/control-segmented, @halftone-web/control-select, @halftone-web/control-switch, @halftone-web/curve-editor, @halftone-web/lib-controls-bezier, @halftone-web/lib-controls-schema, @halftone-web/lib-controls-spring, @halftone-web/lib-controls-transfer, @halftone-web/number-field, @halftone-web/presets, @halftone-web/spring-editor, @halftone-web/swatch, @halftone-web/vec2-pad
- Also searched as
- inspector, property panel, properties panel, editor panel, sliders
- Registry JSON
- /r/web/control-panel.json
Agents: the whole registry is at /llms.txt.