bootstack.images.get_icon#
- bootstack.images.get_icon(name, *, size=20, color='foreground')#
Create a theme-aware icon image from a Bootstrap Icons name.
The returned handle can be passed to any widget that accepts
image=. Whencoloris a theme color token (the default), the icon re-renders to match whenever the theme changes; a literal hex color stays fixed.- Parameters:
name (str) – Bootstrap Icons name, for example
'house'or'arrow-right'. Browse the catalog at https://icons.getbootstrap.com.size (int) – Icon size in pixels. Defaults to
20.color (str) – A theme color token (such as
'foreground','primary', or'danger') or a literal hex string like'#ff8800'. Token colors follow the active theme; hex colors are fixed. Defaults to'foreground'.
- Returns:
A new image handle that renders the icon on demand.
- Return type: