Typography helpers

Bulma documentation

Change the size, weight, and other font properties of the text.

Sizes

ModifierFont size
b.FontSize(1)Set font size to 1 (3 rem)
b.FontSize(2)Set font size to 2 (2.5 rem)
b.FontSize(3)Set font size to 3 (2 rem)
b.FontSize(4)Set font size to 4 (1.5 rem)
b.FontSize(5)Set font size to 5 (1.25 rem)
b.FontSize(6)Set font size to 6 (default size) (1 rem)
b.FontSize(7)Set font size to 7 (0.75 rem)

Responsive size

You can choose a specific size for each viewport width, by calling one of the following methods on the size modifier:

MethodAction
.Mobile()Apply on mobile
.Touch()Apply on mobile and tablet
.Tablet()Apply on tablet and larger
.Desktop()Apply on desktop and larger
.Widescreen()Apply on widescreen and full HD
.FullHD()Apply on full HD

Alignment

ModifierAlignment
b.TextCenteredCentered
b.TextJustifiedJustified
b.TextLeftLeft
b.TextRightRight

Responsive Alignment

You can align text differently for each viewport width viewport width, by calling one of the following methods on the size modifier:

MethodAction
.Mobile()Apply on mobile
.Touch()Apply on mobile and tablet
.TabletOnly()Apply on tablet
.Tablet()Apply on tablet and larger
.DesktopOnly()Apply on desktop
.Desktop()Apply on desktop and larger
.WidescreenOnly()Apply on widescreen
.Widescreen()Apply on widescreen and full HD
.FullHD()Apply on full HD

Text transformation

ModifierTransformation
b.CapitalizedFirst character of each word uppercased
b.LowercaseTRANSFORM aLL cHaRaCtErs to LOWERcase
b.UppercaseTRANSFORM aLL cHaRaCtErs to UPPERcase
b.ItalicTransform all characters to italic
b.UnderlinedUnderline the text

Text weight

ModifierWeight
b.WeightLightTransform weight to light
b.WeightNormalTransform weight to normal
b.WeightMediumTransform weight to medium
b.WeightSemiBoldTransform weight to semi-bold
b.WeightBoldTransform weight to bold

Font family

ModifierFamily
b.SansSerifSet font family to sans serif
b.MonospaceSet font family to monospace
b.FamilyPrimarySet font family to primary
b.FamilySecondarySet font family to secondary
b.CodeSet font family to code