Breadcrumb

The b.Breadcrumb constructor creates a breadcrumb.

ModifierAction
b.CenteredCenter the breadcrumb in its container
b.RightAlign the breadcrumb to the right
b.ArrowSeparatorUse an arrow () as the separator
b.BulletSeparatorUse a bullet () as the separator
b.DotSeparatorUse a dot (·) as the separator
b.SucceedsSeparatorUse a "succeeds" character () as the separator
b.SmallSet size to small
b.MediumSet size to medium
b.LargeSet size to large
ChildAction
b.OnUl(...any)Apply children to the <ul> element
b.OnNav(...any)Apply children to the <nav> element
e.Class, e.Classer, e.Classeser or e.StylesApply child to the <nav> element
gomponents.Nodeof type gomponents.AttributeTypeApply child to the <nav> element
gomponents.Nodeof type gomponents.ElementTypeApply child to the <ul> element
Anything elseApply child to the <ul> element

The b.BreadcrumbEntry constructor creates a breadcrumb entry (which is a regular <li> element).

The b.BreadcrumbAHref constructor creates a breadcrumb link entry.

ModifierAction
b.ActiveApply the active style and add the aria-current="page" attribute

Bulma examples

Example
Code
b.Breadcrumb(
	b.BreadcrumbEntry(
		e.AHref("#", "Bulma"),
	),
	b.BreadcrumbEntry(
		e.AHref("#", "Documentation"),
	),
	b.BreadcrumbEntry(
		e.AHref("#", "Components"),
	),
	b.BreadcrumbEntry(
		b.Active,
		e.AHref("#", e.AriaCurrentPage, "Breadcrumb"),
	),
)
ResultHTML

Bulma-Gomponents provides the b.BreadcrumbHref and b.BreadcrumbActiveAHrefhelpers for regular breadcrumb links:

Example
Code
b.Breadcrumb(
	b.BreadcrumbAHref("#", "Bulma"),
	b.BreadcrumbAHref("#", "Documentation"),
	b.BreadcrumbAHref("#", "Components"),
	b.BreadcrumbAHref("#", b.Active, "Breadcrumb"),
)
ResultHTML

Alignment

Example
Code
b.Breadcrumb(
	b.Centered,
	b.BreadcrumbAHref("#", "Bulma"),
	b.BreadcrumbAHref("#", "Documentation"),
	b.BreadcrumbAHref("#", "Components"),
	b.BreadcrumbAHref("#", b.Active, "Breadcrumb"),
)
ResultHTML
Example
Code
b.Breadcrumb(
	b.Right,
	b.BreadcrumbAHref("#", "Bulma"),
	b.BreadcrumbAHref("#", "Documentation"),
	b.BreadcrumbAHref("#", "Components"),
	b.BreadcrumbAHref("#", b.Active, "Breadcrumb"),
)
ResultHTML

Icons

Example
Code
b.Breadcrumb(
	b.BreadcrumbAHref("#", fa.Icon(fa.Solid, "home"), "Bulma"),
	b.BreadcrumbAHref("#", fa.Icon(fa.Solid, "book"), "Documentation"),
	b.BreadcrumbAHref("#", fa.Icon(fa.Solid, "puzzle-piece"), "Components"),
	b.BreadcrumbAHref("#", b.Active, fa.Icon(fa.Solid, "thumbs-up"), "Breadcrumb"),
)
ResultHTML

Alternative separators

Example
Code
easy.Breadcrumb(
	b.ArrowSeparator,
	b.BreadcrumbAHref("#", "Bulma"),
	b.BreadcrumbAHref("#", "Documentation"),
	b.BreadcrumbAHref("#", "Components"),
	b.BreadcrumbAHref("#", b.Active, "Breadcrumb"),
)
ResultHTML
Example
Code
b.Breadcrumb(
	b.BulletSeparator,
	b.BreadcrumbAHref("#", "Bulma"),
	b.BreadcrumbAHref("#", "Documentation"),
	b.BreadcrumbAHref("#", "Components"),
	b.BreadcrumbAHref("#", b.Active, "Breadcrumb"),
ResultHTML
Example
Code
b.Breadcrumb(
	b.DotSeparator,
	b.BreadcrumbAHref("#", "Bulma"),
	b.BreadcrumbAHref("#", "Documentation"),
	b.BreadcrumbAHref("#", "Components"),
	b.BreadcrumbAHref("#", b.Active, "Breadcrumb"),
)
ResultHTML
Example
Code
b.Breadcrumb(
	b.SucceedsSeparator,
	b.BreadcrumbAHref("#", "Bulma"),
	b.BreadcrumbAHref("#", "Documentation"),
	b.BreadcrumbAHref("#", "Components"),
	b.BreadcrumbAHref("#", b.Active, "Breadcrumb"),
)
ResultHTML

Sizes

Example
Code
b.Breadcrumb(
	b.Small,
	b.BreadcrumbAHref("#", "Bulma"),
	b.BreadcrumbAHref("#", "Documentation"),
	b.BreadcrumbAHref("#", "Components"),
	b.BreadcrumbAHref("#", b.Active, "Breadcrumb"),
)
ResultHTML
Example
Code
b.Breadcrumb(
	b.Medium,
	b.BreadcrumbAHref("#", "Bulma"),
	b.BreadcrumbAHref("#", "Documentation"),
	b.BreadcrumbAHref("#", "Components"),
	b.BreadcrumbAHref("#", b.Active, "Breadcrumb"),
)
ResultHTML
Example
Code
b.Breadcrumb(
	b.Large,
	b.BreadcrumbAHref("#", "Bulma"),
	b.BreadcrumbAHref("#", "Documentation"),
	b.BreadcrumbAHref("#", "Components"),
	b.BreadcrumbAHref("#", b.Active, "Breadcrumb"),
)
ResultHTML