Cloud|

@k2b/ui

Boolean inputs

Switch, checkbox, and descriptive checkbox-card controls.

Switch@k2b/uiCheckbox@k2b/uiCheckboxCard@k2b/ui

Native checkbox semantics wrapped in three accessor-controlled presentations for immediate settings, form choices, and descriptive cards.

TSX

Copy
<Switch label="Automation" value={enabled} onValueChange={setEnabled} />
<Checkbox label="Send a summary" description="Notify everyone when the run finishes." value={checked} onValueChange={setChecked} />
<CheckboxCard label="Early access" description="Preview new components." icon="ti ti-flask" value={checked} onValueChange={setChecked} />

@k2b/ui provides Switch, Checkbox, and CheckboxCard for controlled boolean values. The parent owns the value, validation, and persistence.

Use boolean inputs

Use Switch for an immediate on/off setting.

Use Checkbox for a selection, acknowledgement, or form value. Use CheckboxCard when the choice needs an explanation, icon, or color marker.

Import

tsx
import {
  Checkbox,
  CheckboxCard,
  Switch,
} from "@k2b/ui";

State and variants

All three components accept value directly or as a Solid accessor. Because a native boolean choice is atomic, each change reports the next value through both onValueChange and onValueCommit.

All three support the shared label, description, reactive error, required, and disabled field state.

For partial bulk selections, pass indeterminate. A checkbox without a visible label or description renders as a compact control; give that form an accessible name with aria-label.

CheckboxCard takes a text or JSX label. Add either icon or a valid three- or six-digit hex color as supporting context. variant="input" uses the denser input surface; the default is "card".

Accessibility

Each component uses a native checkbox. Labels activate the control, focus remains visible, and checked state is available to assistive technology.

The label must state what the checked value means. Do not rely on position, color, or the switch shape to convey state.

Runtime

State changes require hydrated Solid client code. The native inputs remain visible to assistive technology.

Example

tsx
const [notifications, setNotifications] = createSignal(true);
const [review, setReview] = createSignal(false);

<Switch
  label="Notifications"
  value={notifications}
  onValueChange={setNotifications}
/>;

<CheckboxCard
  label="Needs review"
  description="Require approval before publishing."
  icon="ti ti-eye-check"
  value={review}
  onValueChange={setReview}
/>;

<Checkbox
  aria-label="Select visible records"
  value={allSelected()}
  indeterminate={someSelected() && !allSelected()}
  onValueChange={setAllSelected}
/>;

Connect a coding agent

The Cloud skill provides compact working instructions. MCP supplies exact current documentation when details matter.

CLI command
bunx skills add https://docs.example.com

This command installs the working instructions published by this website in the selected coding agent.

For exact, current details, also connect the MCP server through one of the agent tabs.

Installation uses the open-source Vercel Skills CLI.

The skill and MCP complement each other: the skill describes workflows, while MCP supplies current documentation.