vwf .

API Reference

Complete API documentation for components, utilities, and framework core

Reference/API/Select

Select

Dropdown selection control with grid overlay pattern

🔧 Props

PropertyTypeDefaultDescription
idstringselect-{timestamp}Unique identifier
labelstringundefinedLabel text above select
optionsArray[]Options as strings or {value, text} objects
valuevan.state|stringundefinedSelected value (reactive or primitive)
placeholderstringSelect...Placeholder when no option selected
requiredbooleanfalseRequired field indicator
onchangefunctionundefinedChange event handler

💻 Examples

Simple Select

const size = van.state('');
return Select({
  label: 'Size',
  options: ['Small', 'Medium', 'Large'],
  value: size,
  onchange: e => size.val = e.target.value
});

▶️ 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