Controls

Checkbox

Preview
Reduced motion

Simulates prefers-reduced-motion for the demo. Off follows your system setting.

Keyboard stepping

Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.

Checkbox

Checkbox

A squircle checkbox that squashes, fills and draws its tick.

Installation

npx shadcn@latest add ikislay/pixel-ui/checkbox

How to use

import { Checkbox } from "@/components/ui/checkbox"
export function Demo() {
return (
<label className="flex items-center gap-3">
<Checkbox defaultChecked />
Email me about new releases
</label>
)
}

Source Code

// Loading…

Props

Options you can pass to customize this component.

Prop
Type
Description
checked
boolean"indeterminate"

Controls the state. Leave it unset to let the checkbox manage itself.

defaultChecked
boolean"indeterminate"

The starting state when uncontrolled.

onCheckedChange
(checked: boolean) => void

Called with the new state. Indeterminate always turns checked.

onFeedback
(event: "toggle") => void

Called at each semantic moment, for wiring sound or haptics.

className
string

Merged onto the root element.