Icon

The b.Icon constructor creates a container for an icon font.

ModifierAction
b.WhiteSet color to white
b.BlackSet color to black
b.LightSet color to light
b.DarkSet color to dark
b.PrimarySet color to primary
b.LinkSet color to link
b.InfoSet color to info
b.SuccessSet color to success
b.WarningSet color to warning
b.DangerSet color to danger
b.BlackBisSet color to black bis
b.BlackTerSet color to black ter
b.GreyDarkerSet color to grey darker
b.GreyDarkSet color to grey dark
b.GreySet color to grey
b.GreyLightSet color to grey light
b.GreyLigherSet color to grey lighter
b.WhiteTerSet color to white ter
b.WhiteBisSet color to white bis
b.PrimaryLightSet color to primary light
b.LinkLightSet color to link light
b.InfoLightSet color to info light
b.SuccessLightSet color to success light
b.WarningLightSet color to warning light
b.DangerLightSet color to danger light
b.PrimaryDarkSet color to primary dark
b.LinkDarkSet color to link dark
b.InfoDarkSet color to info dark
b.SuccessDarkSet color to success dark
b.WarningDarkSet color to warning dark
b.DangerDarkSet color to danger dark
b.SmallSet size to small
b.MediumSet size to medium
b.LargeSet size to large

The b.IconText constructor creates an icon+text span container and embeds all its non-icon children into spans. The b.FlexIconText constructor creates a flex icon+text span container and embeds all its non-icon children into spans.

ModifierAction
b.WhiteSet color to white
b.BlackSet color to black
b.LightSet color to light
b.DarkSet color to dark
b.PrimarySet color to primary
b.LinkSet color to link
b.InfoSet color to info
b.SuccessSet color to success
b.WarningSet color to warning
b.DangerSet color to danger
b.BlackBisSet color to black bis
b.BlackTerSet color to black ter
b.GreyDarkerSet color to grey darker
b.GreyDarkSet color to grey dark
b.GreySet color to grey
b.GreyLightSet color to grey light
b.GreyLigherSet color to grey lighter
b.WhiteTerSet color to white ter
b.WhiteBisSet color to white bis
b.PrimaryLightSet color to primary light
b.LinkLightSet color to link light
b.InfoLightSet color to info light
b.SuccessLightSet color to success light
b.WarningLightSet color to warning light
b.DangerLightSet color to danger light
b.PrimaryDarkSet color to primary dark
b.LinkDarkSet color to link dark
b.InfoDarkSet color to info dark
b.SuccessDarkSet color to success dark
b.WarningDarkSet color to warning dark
b.DangerDarkSet color to danger dark

Font Awesome

Thegithub.com/willoma/bulma-gomponents/fa package provides helpers for Font Awesome icons.

The fa.Icon constructor creates a Font Awesome icon, embedded in an icon container, dealing with appropriately applying children to the icon element or to the span container. The fa.FA constructor creates a Font Awesome icon only, without the icon container. These constructors accept the same modifiers as b.Icon, as well as the Font Awesome-specific values described in following sections.

ChildAction
fa.OnFA(...any)Apply children to the Font Awesome <i> element
fa.OnIcon(...any)Apply children to the <span> element
Anything elseApply children to the <span> element

First arguments

The fa.Icon and fa.FA functions require at least two arguments:

  1. The font style, one of fa.Brand, fa.Duotone, fa.Light, fa.SharpLight, fa.Regular, fa.SharpRegular, fa.Solid, fa.SharpSolid, fa.Thin or fa.SharpThin
  2. The icon name, without the fa- prefix (for example, "home" or "spinner")

Styling basics

Arguments provided to fa.Icon are automatically applied to the <span> or <i> element, depending on its nature. If you need to explicitly apply a child to the <i> element, use fa.FA and include it manually as a child of b.Icon.

Example
Code
e.Span(
	e.Styles{"font-size", "3em", "color": "Tomato"},
	fa.FA(
		fa.Solid, "camera",
	),
),
" ",
e.Span(
	e.Styles{"font-size", "48px", "color": "Dodgerblue"},
	fa.FA(
		fa.Solid, "camera",
	),
),
" ",
e.Span(
	e.Styles{"font-size": "3rem"},
	e.Span(
		e.Styles{"color": "Mediumslateblue"},
		fa.FA(
			fa.Solid, "camera",
		),
	),
)
ResultHTML

Sizing icons

ModifierAction
fa.Size(2)sSet size to 2xs
fa.Size()sSet size to xs
fa.SizeSmSet size to sm
fa.SizeLgSet size to lg
fa.Size()lSet size to xl
fa.Size(2)lSet size to 2xl
fa.Size(0) to fa.Size(10)Set size to the provided integer value

Fixed width icons

In order to make all your icons the same width so they can easily vertically align, like in a list or navigation menu, use thefa.FixedWidth modifier.

However, please note that Bulma icons are already square, with a fixed width.

Example
Code
e.Div(fa.FA(fa.Solid, "skating", fa.FixedWidth, e.Styles{"background": "DodgerBlue")), " Skating"},
e.Div(fa.FA(fa.Solid, "skiing", fa.FixedWidth, e.Styles{"background": "SkyBlue")), " Skiing"},
e.Div(fa.FA(fa.Solid, "skiing-nordic", fa.FixedWidth, e.Styles{"background": "DodgerBlue")), " Nordic Skiing"},
e.Div(fa.FA(fa.Solid, "snowboarding", fa.FixedWidth, e.Styles{"background": "SkyBlue")), " Snowboarding"},
e.Div(fa.FA(fa.Solid, "snowplow", fa.FixedWidth, e.Styles{"background": "DodgerBlue")), " Snowplow"},
ResultHTML
Skating
Skiing
Nordic Skiing
Snowboarding
Snowplow

Icons in a list

Use fa.UList and fa.Li to replace default bullets in unordered lists. You can also keep the semantics of an ordered list behind the scenes but use icon bullets visually with fa.OList.

Example
Code
fa.UList(
	fa.Li(fa.Solid, "check-square", "List icons can"),
	fa.Li(fa.Solid, "check-square", "be used to"),
	fa.Li(fa.Solid, "spinner", fa.Spin(fa.Pulse), "replace bullets"),
	fa.Li(fa.Regular, "square", "in lists"),
)
ResultHTML
  • List icons can
  • be used to
  • replace bullets
  • in lists
Example
Code
fa.OList(
	fa.Li(fa.Solid, "check-square", "List icons can"),
	fa.Li(fa.Solid, "check-square", "be used to"),
	fa.Li(fa.Solid, "spinner", fa.Spin(fa.Pulse), "replace bullets"),
	fa.Li(fa.Regular, "square", "in lists"),
)
ResultHTML
  1. List icons can
  2. be used to
  3. replace bullets
  4. in lists

Rotate icons

To arbitrarily rotate and flip icons, use one of the following modifiers on fa.Icon, fa.FA or fa.Li:

  • fa.Rotate90
  • fa.Rotate180
  • fa.Rotate270
  • fa.FlipHorizontal
  • fa.FlipVertical
  • fa.FlipBoth
Example
Code
fa.FA(fa.Solid, "snowboarding"), " ",
fa.FA(fa.Solid, "snowboarding", fa.Rotate90), " ",
fa.FA(fa.Solid, "snowboarding", fa.Rotate180), " ",
fa.FA(fa.Solid, "snowboarding", fa.Rotate270), " ",
fa.FA(fa.Solid, "snowboarding", fa.FlipHorizontal), " ",
fa.FA(fa.Solid, "snowboarding", fa.FlipVertical), " ",
fa.FA(fa.Solid, "snowboarding", fa.FlipBoth)
ResultHTML

In order to apply a custom rotation, use a fa.Rotate value.

Example
Code
fa.FA(fa.Solid, "snowboarding"), " ",
fa.FA(fa.Solid, "snowboarding", fa.Rotate(45)), " ",
fa.FA(fa.Solid, "snowboarding", fa.Rotate(-45)), " ",
fa.FA(fa.Solid, "snowboarding", fa.Rotate(19)), " ",
fa.FA(fa.Solid, "snowboarding", fa.Rotate(80)), " ",
fa.FA(fa.Solid, "snowboarding", fa.Rotate(0.25)), " ",
fa.FA(fa.Solid, "snowboarding", fa.Rotate(-0.25))
ResultHTML

When combining rotation and flipping, the <i> is automatically embedded in a <span> in order to apply all transformations.

Example
Code
fa.FA(fa.Solid, "snowboarding", fa.Rotate90, fa.FlipHorizontal), " ",
fa.FA(fa.Solid, "snowboarding", fa.FlipHorizontal, fa.Rotate90), " ",
fa.FA(fa.Solid, "snowboarding", fa.FlipVertical, fa.Rotate270), " ",
fa.FA(fa.Solid, "snowboarding", fa.Rotate270, fa.FlipVertical), " ",
fa.FA(fa.Solid, "snowboarding", fa.FlipBoth, fa.Rotate(120)), " ",
fa.FA(fa.Solid, "snowboarding", fa.Rotate(20), fa.FlipBoth), " "
ResultHTML

Animating icons

The icons can be animated using one of the structures implementing fa.Animation. Values are rounded to the 2nd decimal.

ModifierAction
fa.Delay(time.Duration)Add an initial delay
fa.DirectionNormalChange the animation direction to normal
fa.DirectionReverseChange the animation direction to reverse
fa.DirectionAlternateChange the animation direction to alternate
fa.DirectionAlternateReverseChange the animation direction to alternate reverse
fa.Duration(time.Duration)Set duration
fa.IterationCount(float64)Set number of iterations
fa.TimingEaseSet animation progress timing to ease
fa.TimingLinearSet animation progress timing to linear
fa.TimingEaseInSet animation progress timing to ease-in
fa.TimingEaseOutSet animation progress timing to ease-out
fa.TimingEaseInOutSet animation progress timing to ease-in-out
fa.TimingStepStartSet animation progress timing to step-start
fa.TimingStepEndSet animation progress timing to step-end

The fa.Beat animation type scales an icon up or down. Additionally to the common attributes, it uses the fa.MaxScale(float64) attribute to set the maximum value the icon will scale.

Example
Code
fa.FA(fa.Solid, "circle-plus", fa.Beat()), " ",
fa.FA(fa.Solid, "heart", fa.Beat()), " ",
fa.FA(fa.Solid, "heart", fa.Beat(fa.Duration(500*time.Millisecond))), " ",
fa.FA(fa.Solid, "heart", fa.Beat(fa.Duration(2*time.Second))), " ",
fa.FA(fa.Solid, "heart", fa.Beat(fa.MaxScale(2))),
ResultHTML

The fa.Fade animation type fades an icon in and out. Additionally to the common attributes, it uses the fa.MinOpacity(float64) attribute to set the lowest opacity the icon will fade to and from.

Example
Code
fa.FA(fa.Solid, "triangle-exclamation", fa.Fade(), " ",
fa.FA(fa.Solid, "skull-crossbones", fa.Fade()), " ",
fa.FA(fa.Solid, "desktop", fa.Fade()), " ",
fa.FA(fa.Solid, "i-cursor", fa.Fade(fa.Duration(2 * time.Second), fa.MinOpacity(0.6)))
ResultHTML

The fa.BeatFade animation type scales and pulses an icon in and out. Additionally to the common attributes, it uses the fa.MaxScale(float64)and fa.MinOpacity(float64) attributes.

Example
Code
fa.FA(fa.Solid, "triangle-exclamation", fa.BeatFade()), " ",
fa.FA(fa.Solid, "square-xmark", fa.BeatFade()), " ",
fa.FA(fa.Solid, "poo-bolt", fa.BeatFade(fa.MinOpacity(0.1), fa.MaxScale(1.25))), " ",
fa.FA(fa.Solid, "circle-info", fa.BeatFade(fa.MinOpacity(0.67), fa.MaxScale(1.075)))
ResultHTML

The fa.Bounce animation type bounces an icon up and down. Additionally to the common attributes, it uses the following attributes:

fa.Rebound(float64)Set the amount of rebound when landing after the jump
fa.Height(float64)Set the max height to jump when bouncing
fa.StartScaleX(float64)Set the icon's horizontal distortion (squish) when starting to bounce
fa.StartScaleY(float64)Set the icon's vertical distortion (squish) when starting to bounce
fa.JumpScaleX(float64)Set the icon's horizontal distortion (squish) at the top of the jump
fa.JumpScaleY(float64)Set the icon's vertical distortion (squish) at the top of the jump
fa.LandScaleX(float64)Set the icon's horizontal distortion (squish) when landing after the jump
fa.LandScaleY(float64)Set the icon's vertical distortion (squish) when landing after the jump
Example
Code
fa.FA(fa.Solid, "basketball", fa.Bounce()), " ",
fa.FA(fa.Solid, "volleyball", fa.Bounce()), " ",
fa.FA(fa.Solid, "frog", fa.Bounce(fa.StartScaleX(1), fa.StartScaleY(1), fa.JumpScaleX(1), fa.JumpScaleY(1), fa.LandScaleX(1), fa.LandScaleY(1))), " ",
fa.FA(fa.Solid, "envelope", fa.Bounce(fa.StartScaleX(1), fa.StartScaleY(1), fa.JumpScaleX(1), fa.JumpScaleY(1), fa.LandScaleX(1), fa.LandScaleY(1), fa.Rebound(0)))
ResultHTML

The fa.Flip animation type rotates an icon in 3D space. By default, it rotates about the Y axis 180 degrees. Additionally to the common attributes, it uses the fa.X(float64), fa.Y(float64), fa.Z(float64) attributes to denote the axis of rotation (between 0 and 1) and the fa.Angle(float64) attribute to set the rotation angle.

Example
Code
fa.FA(fa.Solid, "compact-disc", fa.Flip()), " ",
fa.FA(fa.Solid, "camera-rotate", fa.Flip()), " ",
fa.FA(fa.Solid, "floppy-disk", fa.Flip()), " ",
fa.FA(fa.Solid, "scroll", fa.Flip(fa.X(1), fa.Y(0))), " ",
fa.FA(fa.Solid, "money-check-dollar", fa.Flip(fa.Duration(3*time.Second)))
ResultHTML

The fa.Shake animation type shakes back and forth

Example
Code
fa.FA(fa.Solid, "bell", fa.Shake()), " ",
fa.FA(fa.Solid, "lock", fa.Shake()), " ",
fa.FA(fa.Solid, "stopwatch", fa.Shake()), " ",
fa.FA(fa.Solid, "bomb", fa.Shake())
ResultHTML

The fa.Spin animation type make the icon spin 360° clockwise. Additionally to the common attributes, it uses the fa.Pulse attribute to make the rotation in 8 steps and the fa.Reverse attribute to make the icon spin counter-clockwise.

Example
Code
fa.FA(fa.Solid, "sync", fa.Spin()), " ",
fa.FA(fa.Solid, "circle-notch", fa.Spin()), " ",
fa.FA(fa.Solid, "cog", fa.Spin()), " ",
fa.FA(fa.Solid, "cog", fa.Spin(fa.Reverse)), " ",
fa.FA(fa.Solid, "spinner", fa.Spin(fa.Pulse)), " ",
fa.FA(fa.Solid, "spinner", fa.Spin(fa.Pulse, fa.Reverse))
ResultHTML

Bordered and pulled icons

The fa.Bordermodifier creates a border with radius and padding around an icon. The fa.PullLeft modifier pulls the icon by floating it left and applying a right margin. The fa.PullRight modifier pulls the icon by floating it right and applying a left margin.

Example
Code
e.P(
	fa.FA(fa.Solid, "quote-left", fa.Size(2), fa.PullLeft),
	"Gatsby believed in the green light, the orgastic future that year by year recedes before us. It eluded us then, but that’s no matter — tomorrow we will run faster, stretch our arms further... And one fine morning — So we beat on, boats against the current, borne back ceaselessly into the past.",
),
ResultHTML

Gatsby believed in the green light, the orgastic future that year by year recedes before us. It eluded us then, but that’s no matter — tomorrow we will run faster, stretch our arms further... And one fine morning — So we beat on, boats against the current, borne back ceaselessly into the past.

Example
Code
e.P(
	fa.FA(fa.Solid, "arrow-right", fa.Size(2), fa.PullRight, fa.Border),
	"Gatsby believed in the green light, the orgastic future that year by year recedes before us. It eluded us then, but that’s no matter — tomorrow we will run faster, stretch our arms further... And one fine morning — So we beat on, boats against the current, borne back ceaselessly into the past.",
),
ResultHTML

Gatsby believed in the green light, the orgastic future that year by year recedes before us. It eluded us then, but that’s no matter — tomorrow we will run faster, stretch our arms further... And one fine morning — So we beat on, boats against the current, borne back ceaselessly into the past.

The following modifiers allow customizing the border and pulling effects:

fa.BorderColorSet border color
fa.BorderPaddingSet padding around icon
fa.BorderRadiusSet border radius
fa.BorderStyleSet border style
fa.BorderWidthSet border width
fa.PullMarginSet margin around icon
Example
Code
e.P(
	fa.FA(fa.Solid, "quote-left", fa.Size(2), fa.PullLeft, fa.PullMargin("4em")),
	"Gatsby believed in the green light, the orgastic future that year by year recedes before us. It eluded us then, but that’s no matter — tomorrow we will run faster, stretch our arms further... And one fine morning — So we beat on, boats against the current, borne back ceaselessly into the past.",
)
ResultHTML

Gatsby believed in the green light, the orgastic future that year by year recedes before us. It eluded us then, but that’s no matter — tomorrow we will run faster, stretch our arms further... And one fine morning — So we beat on, boats against the current, borne back ceaselessly into the past.

Example
Code
e.P(
	fa.FA(fa.Solid, "arrow-right", fa.Size(2), fa.PullRight, fa.Border, fa.BorderColor("inherit"), fa.BorderPadding("0.5em"), fa.BorderRadius("100%"), fa.BorderStyle("dotted"), fa.BorderWidth("0.5em")),
	"Gatsby believed in the green light, the orgastic future that year by year recedes before us. It eluded us then, but that’s no matter — tomorrow we will run faster, stretch our arms further... And one fine morning — So we beat on, boats against the current, borne back ceaselessly into the past.",
)
ResultHTML

Gatsby believed in the green light, the orgastic future that year by year recedes before us. It eluded us then, but that’s no matter — tomorrow we will run faster, stretch our arms further... And one fine morning — So we beat on, boats against the current, borne back ceaselessly into the past.

Stacking icons

To stack multiple icons, use the fa.Stack component builder. Then add the fa.Stack1x modifier to the regularly sized icon and add the fa.Stack1x modifier to the larger icon. fa.Inverse can be added to the icon with fa.Stack1x to help with a knock-out looking effect.

Example
Code
fa.Stack(
	fa.FA(fa.Solid, "square", fa.Stack2x),
	fa.FA(fa.Brand, "twitter", fa.Stack1x, fa.Inverse),
), " ",
fa.Stack(
	fa.FA(fa.Solid, "circle", fa.Stack2x),
	fa.FA(fa.Solid, "flag", fa.Stack1x, fa.Inverse),
), " ",
fa.Stack(
	fa.FA(fa.Solid, "camera", fa.Stack1x),
	fa.FA(fa.Solid, "ban", fa.Stack2x, e.Styles{"color": "Tomato"}),
), " ",
fa.Stack(
	fa.FA(fa.Solid, "square", fa.Stack2x),
	fa.FA(fa.Solid, "terminal", fa.Stack1x, fa.Inverse),
), " ",
fa.Stack(
	fa.Size(2),
	fa.FA(fa.Solid, "square", fa.Stack2x),
	fa.FA(fa.Solid, "terminal", fa.Stack1x, fa.Inverse),
)
ResultHTML
Example
Code
fa.FA(fa.Regular, "circle", fa.Size(2)), " ",
fa.Stack(
	fa.FA(fa.Regular, "circle", fa.Stack2x),
	fa.FA(fa.Solid, "flag", fa.Stack1x),
), " ",
fa.Stack(
	e.Styles{"vertical-align": "top"},
	fa.FA(fa.Solid, "circle", fa.Stack2x),
	fa.FA(fa.Solid, "flag", fa.Stack1x, fa.Inverse),
), " ",
fa.FA(fa.Regular, "circle", fa.Size(2))
ResultHTML
Example
Code
fa.FA(fa.Regular, "circle", e.Styles{"vertical-align": "middle"}), " ",
fa.Stack(
	e.Styles{"font-size": "0.5em"},
	fa.FA(fa.Regular, "circle", fa.Stack2x, e.Styles{"vertical-align": "middle"}),
	fa.FA(fa.Solid, "flag", fa.Stack1x, e.Styles{"vertical-align": "middle"}),
), " ",
fa.Stack(
	e.Styles{"font-size": "0.5em"},
	fa.FA(fa.Solid, "circle", fa.Stack2x, e.Styles{"vertical-align": "middle"}),
	fa.FA(fa.Solid, "flag", fa.Stack1x, fa.Inverse, e.Styles{"vertical-align": "middle"}),
), " ",
fa.FA(fa.Regular, "circle", e.Styles{"vertical-align": "middle"})
ResultHTML

The following modifiers allow customizing stacked icons:

fa.ZIndexSet z-index of a stacked icon
fa.InverseColorSet color of an inversed stacked icon
Example
Code
fa.Stack(
	fa.FA(fa.Brand, "twitter", fa.Stack1x, fa.Inverse, fa.ZIndex(2)),
	fa.FA(fa.Solid, "square", fa.Stack2x, fa.ZIndex(1)),
), " ",
fa.Stack(
	fa.InverseColor("#1da1f2"),
	fa.FA(fa.Solid, "square", fa.Stack2x,
	fa.FA(fa.Brand, "twitter", fa.Stack1x, fa.Inverse),
)
ResultHTML

Duotone icons

The following modifiers allow customizing duotone icons:

ModifierAction
fa.SwapOpacitySwap the default opacity of each icon's layers
fa.PrimaryOpacity(float64)Set primary layer opacity
fa.SecondaryOpacity(float64)Set secondary layer opacity
fa.DuoOpacities(primary, secondary float64)Set primary and secondary layers opacities
fa.PrimaryColor(string)Set primary layer color
fa.SecondaryColor(string)Set secondary layer color
fa.DuoColors(primary, secondary string)Set primary and secondary colors
Please note these icons require pro plan, which Bulma-Gomponents do not have, therefore no example may be shown.

Bulma examples

Example
Code
b.Icon(e.I(e.Class("fas"), e.Class("fa-home"))),
b.Icon(fa.FA(fa.Solid, "home")),
fa.Icon(fa.Solid, "home")
ResultHTML

Icon text

Example
Code
b.IconText(
	fa.Icon(fa.Solid, "home"),
	"Home",
)
ResultHTML
Home
Example
Code
b.IconText(
	fa.Icon(fa.Solid, "train"),
	"Paris",
	fa.Icon(fa.Solid, "arrow-right"),
	"Budapest",
	fa.Icon(fa.Solid, "arrow-right"),
	"Bucharest",
	fa.Icon(fa.Solid, "arrow-right"),
	"Istanbul",
	fa.Icon(fa.Solid, "flag-checkered"),
)
ResultHTML
ParisBudapestBucharestIstanbul
Example
Code
b.Content(
	e.P(
		"An invitation to ", b.IconText(fa.Icon(fa.Solid, "utensils"), "dinner"), " was soon afterwards dispatched; and already had Mrs. Bennet planned the courses that were to do credit to her housekeeping, when an answer arrived which deferred it all. Mr. Bingley was obliged to be in ", b.IconText(fa.Icon(fa.Solid, "city"), "town"), " the following day, and, consequently, unable to accept the honour of their ", b.IconText(fa.Icon(fa.Solid, "envelope-open-text"), "invitation"), ", etc.",
	),
	e.P(
		"Mrs. Bennet was quite disconcerted. She could not imagine what business he could have in town so soon after his ", b.IconText(fa.Icon(fa.Solid, "flag-checkered"), "arrival"), " in Hertfordshire; and she began to fear that he might be always ", b.IconText(fa.Icon(fa.Solid, "plane-departure"), "flying"), " about from one place to another, and never settled at Netherfield as he ought to be.",
	),
)
ResultHTML

An invitation to dinner was soon afterwards dispatched; and already had Mrs. Bennet planned the courses that were to do credit to her housekeeping, when an answer arrived which deferred it all. Mr. Bingley was obliged to be in town the following day, and, consequently, unable to accept the honour of their invitation, etc.

Mrs. Bennet was quite disconcerted. She could not imagine what business he could have in town so soon after his arrival in Hertfordshire; and she began to fear that he might be always flying about from one place to another, and never settled at Netherfield as he ought to be.

Example
Code
b.FlexIconText(
			fa.Icon(fa.Solid, "info-circle", b.Info),
			"Information",
		),
		b.Block(
			html.P,
			"Your package will be delivered on ", e.Strong("Tuesday at 08:00"), ".",
		),
		b.FlexIconText(
			fa.Icon(fa.Solid, "check-square", b.Success),
			"Success",
		),
		b.Block(
			html.P,
			"Your image has been successfully uploaded.",
		),
		b.FlexIconText(
			fa.Icon(fa.Solid, "exclamation-triangle", b.Warning),
			"Warning",
		),
		b.Block(
			html.P,
			"Some information is missing from your ", e.AHref("#", "profile"), " details.",
		),
		b.FlexIconText(
			fa.Icon(fa.Solid, "ban", b.Danger),
			"Danger",
		),
		b.Block(
			html.P,
			"There was an error in your submission. ", e.AHref("#", "Please try again"), ".",
		)
ResultHTML
Information

Your package will be delivered on Tuesday at 08:00.

Success

Your image has been successfully uploaded.

Warning

Some information is missing from your profile details.

Danger

There was an error in your submission. Please try again.

Colors

Example
Code
b.Icon(b.Info, e.I(e.Class("fas"), e.Class("fa-info-circle"))),
b.Icon(b.Success, e.I(e.Class("fas"), e.Class("fa-check-square"))),
b.Icon(b.Warning, e.I(e.Class("fas"), e.Class("fa-exclamation-triangle"))),
b.Icon(b.Danger, e.I(e.Class("fas"), e.Class("fa-ban")))
ResultHTML
Example
Code
fa.Icon(fa.Solid, "info-circle", b.Info),
fa.Icon(fa.Solid, "check-square", b.Success),
fa.Icon(fa.Solid, "exclamation-triangle", b.Warning),
fa.Icon(fa.Solid, "ban", b.Danger)
ResultHTML
Example
Code
b.IconText(
	b.Info,
	fa.Icon(fa.Solid, "info-circle"),
	"Info",
),
" ",
b.IconText(
	b.Success,
	fa.Icon(fa.Solid, "check-square"),
	"Success",
),
" ",
b.IconText(
	b.Warning,
	fa.Icon(fa.Solid, "exclamation-triangle"),
	"Warning",
),
" ",
b.IconText(
	b.Danger,
	fa.Icon(fa.Solid, "ban"),
	"Danger",
)
ResultHTML
Info Success Warning Danger

Sizes

Use a size modifier (b.Small, etc) as an argument to b.Icon or fa.Icon.

Font Awesome variations

Example
Code
fa.Icon(fa.Solid, "home", fa.FixedWidth, b.BackgroundWarningLight),
e.Br(),
fa.Icon(fa.Solid, "home", fa.Border),
e.Br(),
fa.Icon(fa.Solid, "spinner", fa.Spin(fa.Pulse))
ResultHTML


Example
Code
b.Icon(
	b.Medium,
	fa.Stack(
		fa.SizeSm,
		fa.FA(fa.Solid, "circle", fa.Stack2x),
		fa.FA(fa.Solid, "flag", fa.Stack1x, fa.Inverse),
	),
)
ResultHTML
Example
Code
b.Icon(
	b.Large,
	fa.Stack(
		fa.FA(fa.Solid, "camera", fa.Stack1x),
		fa.FA(fa.Solid, "ban", fa.Stack2x, b.Danger),
		fa.SizeLg,
	),
)
ResultHTML

Material Design Icons

Nothing specific here.

Ionicons

Nothing specific here.