0.0.0 • Published 2 years ago

@slotvelte/options-selector v0.0.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Options Selector

This svelte component can help you to create a custom UI selectors

See the example

Props

  • value: selected items (bindable), if the value is an array, the component enables "multiple" selection

  • options: Array of available options

  • identify: (optional) Function to get id of options (scalar), it is required if options is an array of objects

  • valueAsId: A flag to change the value behaviour, if is true the value will be an id or an array of ids

Slots

  • default Used to render each element, the slot has the following props
    • option: this is an element of "options" prop
    • selected: indicated if the element is selected
    • toggle: function to toggle the element selection
0.0.0

2 years ago