Controls
Control row
a control’s label row: label, off-default mark, Reset, trailing slot; the control goes underneath
function ControlRowDemo() { const [on, setOn] = React.useState(false); return ( <div className={`flex flex-col gap-4 ${narrow}`}> <ControlRow label="At its default" trailing={<ControlSwitch label="At its default" checked={on} onChange={setOn} />} /> <ControlRow label="Changed" edited onReset={() => undefined} trailing={<span className="text-xs tabular-nums">24px</span>} hint="The mark, the label’s strength and Reset all say it moved." /> </div> );}Usage
Wrap any control in it so every row in a panel reads and resets the same way.
API
<ControlRow label htmlFor? edited? onReset? trailing? hint?>{control}</ControlRow>Get it
Already in every copy of the web kit:
import { ControlRow, OffDefaultMark, ResetButton } from '@/components/controls/control-row';Details
- Exports
ControlRow,OffDefaultMark,ResetButton- Packages
- cn@^0.5.2, lucide-react@^1.52.0
- Also searched as
- label row, edited dot, changed mark, reset
- Registry JSON
- /r/web/control-row.json
Agents: the whole registry is at /llms.txt.