Tabs

The b.Tabs constructor creates a tabs container. Its link children must be created with the b.TabLink constructor.

ModifierAction
b.CenteredCenter the tabs
b.RightAlign the tabs to the right
b.BoxedDraw boxed tabs
b.ToggleButton-looking tabs
b.ToggleRoundedRounded button-looking tabs
b.FullWidthTake the whole width
b.SmallSet size to small
b.MediumSet size to medium
b.LargeSet size to large
ChildAction
b.OnTabs(...any)Apply children to the <div class="tabs"> element
b.OnUl(...any)Apply children to the <ul> element
e.Class, e.Classer, e.Classeser or e.StylesApply child to the <div class="tabs"> element
b.Container(...any)Use element as an intermediate container
Anything elseApply children to the <ul> element

The b.TabLink and b.TabAHref constructors create tab entries which are links.

ModifierAction
b.ActiveApply the is-active class to the <li> element

Bulma examples

Example
Code
b.Tabs(
	b.TabLink(b.Active, "Pictures"),
	b.TabLink("Music"),
	b.TabLink("Videos"),
	b.TabLink("Documents"),
)
ResultHTML

Alignment

Example
Code
b.Tabs(
	b.Centered,
	b.TabLink(b.Active, "Pictures"),
	b.TabLink("Music"),
	b.TabLink("Videos"),
	b.TabLink("Documents"),
)
ResultHTML
Example
Code
b.Tabs(
	b.Right,
	b.TabLink(b.Active, "Pictures"),
	b.TabLink("Music"),
	b.TabLink("Videos"),
	b.TabLink("Documents"),
)
ResultHTML

Icons

Example
Code
b.Tabs(
	b.TabLink(b.Active, fa.Icon(fa.Solid, "image"), "Pictures"),
	b.TabLink(fa.Icon(fa.Solid, "music"), "Music"),
	b.TabLink(fa.Icon(fa.Solid, "film"), "Videos"),
	b.TabLink(fa.Icon(fa.Solid, "file-alt"), "Documents"),
)
ResultHTML

Sizes

Example
Code
b.Tabs(
	b.Small,
	b.TabLink(b.Active, "Pictures"),
	b.TabLink("Music"),
	b.TabLink("Videos"),
	b.TabLink("Documents"),
)
ResultHTML
Example
Code
b.Tabs(
	b.Medium,
	b.TabLink(b.Active, "Pictures"),
	b.TabLink("Music"),
	b.TabLink("Videos"),
	b.TabLink("Documents"),
)
ResultHTML
Example
Code
b.Tabs(
	b.Large,
	b.TabLink(b.Active, "Pictures"),
	b.TabLink("Music"),
	b.TabLink("Videos"),
	b.TabLink("Documents"),
)
ResultHTML

Styles

Example
Code
b.Tabs(
	b.Boxed,
	b.TabLink(b.Active, fa.Icon(fa.Solid, "image"), "Pictures"),
	b.TabLink(fa.Icon(fa.Solid, "music"), "Music"),
	b.TabLink(fa.Icon(fa.Solid, "film"), "Videos"),
	b.TabLink(fa.Icon(fa.Solid, "file-alt"), "Documents"),
)
ResultHTML
Example
Code
b.Tabs(
	b.Toggle,
	b.TabLink(b.Active, fa.Icon(fa.Solid, "image"), "Pictures"),
	b.TabLink(fa.Icon(fa.Solid, "music"), "Music"),
	b.TabLink(fa.Icon(fa.Solid, "film"), "Videos"),
	b.TabLink(fa.Icon(fa.Solid, "file-alt"), "Documents"),
)
ResultHTML
Example
Code
b.Tabs(
	b.ToggleRounded,
	b.TabLink(b.Active, fa.Icon(fa.Solid, "image"), "Pictures"),
	b.TabLink(fa.Icon(fa.Solid, "music"), "Music"),
	b.TabLink(fa.Icon(fa.Solid, "film"), "Videos"),
	b.TabLink(fa.Icon(fa.Solid, "file-alt"), "Documents"),
)
ResultHTML
Example
Code
b.Tabs(
	b.FullWidth,
	b.TabLink(fa.Icon(fa.Solid, "angle-left"), "Left"),
	b.TabLink(fa.Icon(fa.Solid, "angle-up"), "Up"),
	b.TabLink(fa.Icon(fa.Solid, "angle-right"), "Right"),
)
ResultHTML

Combining

Example
Code
b.Tabs(
	b.Centered,
	b.Boxed,
	b.TabLink(b.Active, fa.Icon(fa.Solid, "image"), "Pictures"),
	b.TabLink(fa.Icon(fa.Solid, "music"), "Music"),
	b.TabLink(fa.Icon(fa.Solid, "film"), "Videos"),
	b.TabLink(fa.Icon(fa.Solid, "file-alt"), "Documents"),
)
ResultHTML
Example
Code
b.Tabs(
	b.Toggle,
	b.FullWidth,
	b.TabLink(b.Active, fa.Icon(fa.Solid, "image"), "Pictures"),
	b.TabLink(fa.Icon(fa.Solid, "music"), "Music"),
	b.TabLink(fa.Icon(fa.Solid, "film"), "Videos"),
	b.TabLink(fa.Icon(fa.Solid, "file-alt"), "Documents"),
)
ResultHTML
Example
Code
b.Tabs(
	b.Centered,
	b.Boxed,
	b.Medium,
	b.TabLink(b.Active, fa.Icon(fa.Solid, "image"), "Pictures"),
	b.TabLink(fa.Icon(fa.Solid, "music"), "Music"),
	b.TabLink(fa.Icon(fa.Solid, "film"), "Videos"),
	b.TabLink(fa.Icon(fa.Solid, "file-alt"), "Documents"),
)
ResultHTML
Example
Code
b.Tabs(
	b.Toggle,
	b.FullWidth,
	b.Large,
	b.TabLink(b.Active, fa.Icon(fa.Solid, "image"), "Pictures"),
	b.TabLink(fa.Icon(fa.Solid, "music"), "Music"),
	b.TabLink(fa.Icon(fa.Solid, "film"), "Videos"),
	b.TabLink(fa.Icon(fa.Solid, "file-alt"), "Documents"),
)
ResultHTML