checkbox Group
This component generates a group of checkboxes. So this component should be used if a user should be able to choose multiple values from a list of options.
The function requires a list of items T as mandatory parameter, representing the pool of choices. Clients should also consider to pass a Store<List<T>> too, in order to let the component manage the selected items and also use this for preselection.
Example usage
// simple use case showing the core functionality
val options = listOf("A", "B", "C")
val myStore = storeOf<List<String>>(emptyList())
checkboxGroup(items = options, values = myStore) {
}
See also
Parameters
a lambda expression for declaring the styling as fritz2's styling DSL
a list of all available options
a store of List
optional CSS class that should be applied to the element
the ID of the element
the prefix for the generated CSS class resulting in the form $prefix-$hash
a lambda expression for setting up the component itself. Details in CheckboxGroupComponent