Appearance
Icon
Icon shows a small square symbol sized to sit beside text. It draws a glyph from the built-in icon font, or a small image.
Light
Dark
Glyphs
The built-in set is Lucide, available as LucideIcon:
cpp
#include <barton/icons/lucide.h>
Icon { LucideIcon::Search }
Icon { LucideIcon::Settings, size = 20.f, color = Color::GRAY }Icons are 16px by default and take the theme's text color, so they match the text beside them without extra props.
Images as icons
A loaded image works anywhere a glyph does:
cpp
const auto avatar = assets.load<Pixmap>("avatars/ada.png");
Row {
gap = 8_px,
align_items = Align::Center,
Icon { avatar, size = 20.f },
Text { "Ada" },
}Menu items take icons the same way, through their icon prop.