SmartSelect
SmartSelect allows you to easily convert your usual form select or dropdown into dynamic page, popup dialog, or sliding bottom sheet with various choices input such as radio, checkbox, switch, chips, or even custom input. Supports single and multiple choice. Inspired by Smart Select component from Framework7.
Preview
Features
- Select single or multiple choice
- Open choices modal in full page, bottom sheet, or popup dialog
- Various choices input (radio, checkbox, switch, chips, or custom widget)
- Various choices layout (list, wrap, or grid)
- Grouping choices with easy support to sticky header
- Searchable choices with highlighted result
- Disabled or hidden choices
- Customizable trigger/tile widget
- Customizable modal style
- Customizable modal header style
- Customizable modal footer
- Customizable choices style
- Build choice items from any
List
- Easy load async choice items
- and many more
Usage
For a complete usage, please see the example.
To read more about classes and other references used by smart_select
, see the API Reference.
Single Choice
Multiple Choice
Choices
choiceItems
can be input directly as in the example below, more info about S2Choice
can be found on the API Reference
choiceItems
also can be created from any list using helper provided by this package, like the example below
Load Choice Item Asynchronously
Please follow these example
Modal Configuration
More info about S2ModalConfig
can be found on the API Reference
Modal Type
By default SmartSelect will open choices modal in full page. You can change it by changing with this value:
Modal Style
Modal Header Style
Choices Configuration
More info about S2ChoiceConfig
can be found on the API Reference
Choice Type
By default SmartSelect will use radios
for single choice and checkboxes
for multiple choice, but it can change by changing with this value:
Choice Layout
By default SmartSelect will use list
, but it can change by changing with this value: