Skip to content

BootstrapIcon

Bases: Icon

Convenience icon for the Bootstrap glyph set.

Resolves the provided name (optionally with a style) using BootstrapFontProvider, then initializes the base Icon with the resolved glyph.

Parameters:

Name Type Description Default
name str

Glyph name. May be a friendly name (e.g. "house") or a raw glyph (e.g. "house-fill"). If you pass a conflicting style (e.g. name ends with "-fill" but you set style="outline"), a ValueError is raised.

required
size int

Pixel size of the rasterized image (default: 24).

24
color str

Foreground color used to render the glyph (default: "black").

'black'
style BootstrapStyles | None

Optional style override: "outline" or "fill". If omitted, the provider's default style is used. When name already encodes a style suffix (e.g. "-fill"), that suffix takes precedence.

None

Raises:

Type Description
ValueError

If the name cannot be resolved for the requested style.