Box

The b.Box constructor returns a white box with some padding and a shadow.

Bulma examples

Example
Code
b.Box("I'm in a box.")
ResultHTML
I'm in a box.
Example
Code
b.Box(
	html.FormEl,
	b.Field(
		b.Label("Email"),
		b.Control(
			b.InputEmail(e.Placeholder("e.g. alex@example.com")),
		),
	),
	b.Field(
		b.Label("Password"),
		b.Control(
			b.InputPassword(e.Placeholder("********")),
		),
	),
	b.Button(b.Primary, "Sign in"),
)
ResultHTML
Example
Code
b.Box(
	b.Media(
		b.MediaLeft(
			b.ImageImg(
				"https://bulma.io/assets/images/placeholders/128x128.png",
				b.ImgSq64,
				b.ImgAlt("Image"),
			),
		),
		b.Content(
			e.P(
				e.Strong("John Smith"), " ", e.Small("@johnsmith"), " ", e.Small("31m"),
				e.Br(),
				"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean efficitur sit amet massa fringilla egestas. Nullam condimentum luctus turpis.",
			),
		),
		b.Level(
			b.Mobile,
			b.LevelLeft(
				e.A(e.AriaLabel("reply"), fa.Icon(fa.Solid, "reply", b.Small)),
				e.A(e.AriaLabel("retweet"), fa.Icon(fa.Solid, "retweet", b.Small)),
				e.A(e.AriaLabel("like"), fa.Icon(fa.Solid, "heart", b.Small)),
			),
		),
	),
)
ResultHTML
Image

John Smith @johnsmith 31m
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean efficitur sit amet massa fringilla egestas. Nullam condimentum luctus turpis.