vwf .

API Reference

Complete API documentation for components, utilities, and framework core

Reference/API/Checkbox

Checkbox

Custom checkbox with grid overlay and animated SVG checkmark

🔧 Props

PropertyTypeDefaultDescription
idstringcheckbox-{timestamp}Unique identifier
labelstringundefinedCheckbox label
checkedvan.state<boolean>falseChecked state
requiredbooleanfalseRequired field indicator
onchangefunctionundefinedChange event handler
containerClassstring-CSS classes for container

🎨 Utility Classes

PatternDescription
vwfcolor-{color}Sets checkbox color
vwfsize-{size}Controls checkbox size

💻 Examples

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