Switch

A control that allows the user to toggle between checked and not checked.

Installation

The CLI is not yet available. For now, manually copy the component source into your project.

rust-shadcn-ui add switch

Usage

use yew::prelude::*;

use crate::components::ui::switch::Switch;

#[component]
fn Usage() -> impl IntoView {
    view! {
        <Switch />
    }
}

Examples

Form

See Also