Checkbox

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

By clicking this checkbox, you agree to the terms and conditions.

You can manage your mobile notifications in the mobile settings page.

Checkbox Group

Value: [ "recents", "home", "applications", ]

Sidebar

Select the items you want to display in the sidebar.

Anatomy

Import all parts and piece them together.

use leptos::prelude::*;

#[component]
pub fn CheckboxAnatomy() -> impl IntoView {
    view! {
        <CheckboxGroup>
            <Checkbox />
        </CheckboxGroup>
    }
}

API Reference

Checkbox

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

Custom Attributes
NameTypeDefaultDescription
checkedReactive<bool>false

A reactive signal coupled to the checkbox's checked value.

Implements global, input, and checkbox attributes.

CheckboxGroup

Contains all the parts of a checkbox group.

Custom Attributes
NameTypeDefaultDescription
invalidReactive<bool>false

A reactive signal that toggles whether all the children Checkboxes appear invalid or not.

valueReactive<Vec<String>>[]

A dynamic list of all the values of checked children Checkboxes.

Implements global and fieldset attributes.