use fission::prelude::*;
// In view setup; the icon is decorative inside an already-labelled control.
let tokens = &cx.view.env().theme.tokens;
let chevron = Icon::svg_directional(
material::navigation::chevron_left::regular(),
material::navigation::chevron_right::regular(),
)
.size(tokens.sizing.icon_sm)
.color(tokens.colors.text_secondary);
Field | Type | Meaning | Notes / default behavior |
|---|---|---|---|
id | Option<WidgetId> | Stable widget identity. | Defaults to None. |
source | IconSource | Where the icon graphic comes from. | Use path data, inline scalable vector graphics (SVG) content, or a filesystem SVG file. This is the first form you should read when you see SVG on this page. |
color | Option<Color> | Fill color override. | Defaults to the theme's primary text color. |
size | Option<f32> | Square layout size in points. | Defaults to 24.0. |
stroke | Option<Stroke> | Optional stroke style. | When present, fill is suppressed in the checked-in renderer. |
semantic_label | Option<String> | Accessible name for an independently meaningful icon. | Leave absent for decoration or inside a control already carrying the name. |