API Reference
Complete API documentation for components, utilities, and framework core
Checkbox
Custom checkbox with grid overlay and animated SVG checkmark
🔧 Props
| Property | Type | Default | Description |
|---|---|---|---|
| id | string | checkbox-{timestamp} | Unique identifier |
| label | string | undefined | Checkbox label |
| checked | van.state<boolean> | false | Checked state |
| required | boolean | false | Required field indicator |
| onchange | function | undefined | Change event handler |
| containerClass | string | - | CSS classes for container |
🎨 Utility Classes
| Pattern | Description |
|---|---|
| vwfcolor-{color} | Sets checkbox color |
| vwfsize-{size} | Controls checkbox size |
💻 Examples
Basic Checkbox
javascript•Basic Checkbox
const agreed = van.state(false);
return Checkbox({
label: 'I agree to terms',
checked: agreed,
onchange: e => agreed.val = e.target.checked
});▶️ Live Preview
💡 Click "Edit Code" to modify the example
🔄 Click "Apply Changes" to see your modifications
↩️ Click "Reset" to restore original code
💡 Usage Tips
🔗 Related
Explore vwf
Discover what vwf can do