Fusuma

Components / Basics

icon

An icon, as an outline (see IconView::filled).

Try it

This is the Buttons page of the gallery, running in your browser: icon is on it, and it is the real widget. Press Run, then use it.

Live: Buttons, where icon is usedOpen full size

Also on this pagechipbuttonsplit_button

An icon, as an outline (see IconView::filled).

The icons are Lucide's, linked only when asked for (icons feature), so an icon is a small cost on a chip.

Signature

pub const fn icon(icon: fusuma_icons::Icon) -> IconView

Methods

  • .filled(filled: bool) -> Self — Whether the icon is filled in (its closed shapes as well as its outline), as for a chosen item; an outline when not, which is how it starts.

Example

use fusuma::{Icon, icon, row};
let view = row((icon(Icon::Home), icon(Icon::Settings).filled(true)));
let built = fusuma::doc::built::<(), _>(&view);
assert_eq!(built.nodes(), 3);

All components · Source