Function dioxus_material::Chip

source ·
pub fn Chip<'a>(cx: Scope<'a, ChipProps<'a>>) -> Element<'a>
Expand description

Chip component.

Chips help people enter information, make selections, filter content, or trigger actions.

material.io

Panics

This component requires access to a Theme and IconFont.

Examples


use dioxus::prelude::*;
use dioxus_material::{Chip, Theme, IconFont};

fn app(cx: Scope) -> Element {
    render!(Theme {
        IconFont {}
        div { display: "flex", gap: "10px",
            Chip { onclick: |_| {}, "Asset chip" }
            Chip { is_selected: true, onclick: |_| {}, "Asset chip" }
        }
    })
}

Props

For details, see the props struct definition.