Checkbox
StableHigh-precision binary and tri-state selection triggers featuring animated laser checks, cyber glow aura halos, and micro-description subtext.
Installation
$pnpm add @siberui/react
Import
tsx
import { Checkbox } from '@siberui/react';Basic Usage & Descriptions
Checkboxes integrate primary labels and optional monospace telemetry descriptions.
tsx
<div className="flex flex-col gap-4 max-w-md w-full">
<Checkbox
label="Enable Quantum Encrypted Handshake"
description="Encrypt all TLS payloads with lattice cryptography"
defaultChecked
/>
<Checkbox
label="Permit Autonomous Route Optimization"
description="Allow BGP re-routing based on live ping telemetry"
/>
</div>Signal & Semantic Color Halos
Select between vibrant cyber aura signals: neon (Cyan), neonPurple, neonGreen, and minimal default.
tsx
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 w-full max-w-2xl">
<Checkbox variant="neon" label="Cyan Sentinel" description="Primary Defense" defaultChecked />
<Checkbox variant="neonPurple" label="Violet Neural" description="Core Brain" defaultChecked />
<Checkbox variant="neonGreen" label="Emerald Buffer" description="Verified Flow" defaultChecked />
</div>Indeterminate State & Batch Selection
The indeterminate state displays a dash icon when a subset of sub-options is active.
tsx
<div className="flex flex-col gap-3 p-5 rounded-xl bg-[#050811] border border-white/[0.06] max-w-sm w-full">
<Checkbox
label="SELECT ALL PROTOCOLS"
variant="neon"
checked={allChecked}
indeterminate={isIndeterminate}
onCheckedChange={(checked) => {
setItems({ firewall: checked, telemetry: checked, quarantine: checked });
}}
/>
<div className="flex flex-col gap-2.5 pl-6 pt-2 border-t border-white/[0.06]">
<Checkbox
label="Subnet Firewall Matrix"
checked={items.firewall}
onCheckedChange={(checked) => setItems((s) => ({ ...s, firewall: checked }))}
/>
<Checkbox
label="Realtime Threat Telemetry"
checked={items.telemetry}
onCheckedChange={(checked) => setItems((s) => ({ ...s, telemetry: checked }))}
/>
<Checkbox
label="Automated Node Quarantine"
checked={items.quarantine}
onCheckedChange={(checked) => setItems((s) => ({ ...s, quarantine: checked }))}
/>
</div>
</div>Scale & Density (sm, md, lg)
Configure box dimensions across sm (14px), md (16px), and lg (20px).
tsx
<div className="flex flex-col gap-4 max-w-md w-full">
<Checkbox checkboxSize="sm" label="Compact density (sm - 14px)" defaultChecked />
<Checkbox checkboxSize="md" label="Standard density (md - 16px)" defaultChecked />
<Checkbox checkboxSize="lg" label="High-touch density (lg - 20px)" defaultChecked />
</div>Frosted Cyber-Glass Permission Matrix
Compose high-security access control panels with translucent glassmorphic surfaces and active boundary sweeps.
ACL POLICY ASSIGNMENT
V2.4
tsx
<div className="relative w-full max-w-md p-8 rounded-2xl bg-white/[0.04] backdrop-blur-xl border border-white/10 shadow-2xl overflow-hidden">
<div className="relative z-10 space-y-5">
<div className="flex items-center justify-between pb-3 border-b border-white/[0.08]">
<div className="flex items-center gap-2">
<Lock className="h-4 w-4 text-cyan-400" />
<span className="font-mono text-xs font-bold text-white tracking-wider">ACL POLICY ASSIGNMENT</span>
</div>
<Badge variant="glass" dot dotColor="cyan">V2.4</Badge>
</div>
<div className="space-y-3.5">
<Checkbox
variant="neon"
label="Root Shell Execution"
description="Grants unmonitored tty terminal access"
defaultChecked
/>
<Checkbox
variant="neon"
label="Encrypted IPC Channels"
description="Allow inter-process pipe creation"
defaultChecked
/>
<Checkbox
variant="neon"
label="Direct Memory Remap"
description="Bypass DMA isolation filters"
/>
</div>
<div className="pt-2">
<Button variant="neon" glow className="w-full">
SAVE ACL PERMISSIONS
</Button>
</div>
</div>
<BorderBeam variant="neon" size={140} duration={6} borderWidth={1.5} glow />
</div>Tactical HUD Defense Module Selector
Card-level module activation group with realtime status badges and monospace metadata.
ORBITAL DEFENSE MATRIX
ACTIVE
Toggle autonomous sentinel interceptors across sector grids.
tsx
<Card className="max-w-md mx-auto border-cyan-500/30 bg-[#070b14] shadow-xl">
<CardHeader className="pb-4 border-b border-white/[0.06]">
<div className="flex items-center justify-between">
<CardTitle className="text-sm font-mono text-cyan-400 tracking-wider">ORBITAL DEFENSE MATRIX</CardTitle>
<Badge variant="neon" size="sm">ACTIVE</Badge>
</div>
<CardDescription className="text-xs text-slate-400">
Toggle autonomous sentinel interceptors across sector grids.
</CardDescription>
</CardHeader>
<CardContent className="p-6 space-y-4">
<Checkbox
variant="neon"
label="SENTINEL_ALPHA: Kinetic Rail"
description="Sector 01-A • Ammo 98%"
defaultChecked
/>
<Checkbox
variant="neonPurple"
label="SENTINEL_BETA: EMP Wave"
description="Sector 04-B • Capacitors charged"
defaultChecked
/>
<Checkbox
variant="neonGreen"
label="SENTINEL_GAMMA: Laser Point-Defense"
description="Sector 09-D • Active tracking"
/>
</CardContent>
</Card>API Reference
PROPERTIES (8)← swipe to inspect →
| Property | Description | Type | Default |
|---|---|---|---|
variant | Color theme and laser glow preset. | "default" | "neon" | "neonPurple" | "neonGreen" | "primary" | "primary-subtle" | "primary-outline" | "default" |
checkboxSize | Physical bounding box dimension. | "sm" | "md" | "lg" | "md" |
label | Primary text label displayed beside the checkbox. | string | - |
description | Secondary monospace subtext rendered below the label. | string | - |
checked | Controlled checked boolean state. | boolean | - |
defaultChecked | Initial checked state in uncontrolled mode. | boolean | false |
indeterminate | Forces the tri-state minus dash icon. | boolean | false |
onCheckedChange | Callback executed whenever the checked state toggles. | (checked: boolean) => void | - |
Accessibility
- Screen Reader Support: Checkbox utilizes a native, visually-hidden
<input type="checkbox" />to guarantee full compatibility with screen readers and accessibility trees. - Keyboard Interaction: Toggled cleanly via the
Spacekey when focused. - Focus Visibility: Styled with
peer-focus-visible:ring-2for high-visibility keyboard navigation.
Best Practices
- Batch Selection: Always pair parent multi-select checkboxes with
indeterminatewhen only some child items are selected. - Descriptions: Include
descriptionwhen enabling high-impact security privileges or irreversible actions.