Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Dropdown

Live Demo

Open the demo in a separate tab.

Validation Errors

#![allow(unused)]
fn main() {
DropdownConfig::new("Plan")
	.option("Free", "free")
	.option("Pro", "pro")
	.bind(User::plan)
	.error(|errors| text(errors.join("\n")))
}

DropdownConfig::error(...) renders the current validation messages below the control. Bound errors come from the model setter; unbound controls can use application-owned BindingErrorState. See Error Callbacks.