Skip to main content
Every editor component exposes an Advanced section with a className (or classNames) field. This field accepts any valid Bootstrap 5 utility class, giving you fine-grained control over appearance without custom CSS.

Spacing utilities

The most commonly used utilities control margin and padding.

Syntax

TokenValuesMeaning
propertym or pMargin or padding
sidet, b, s, e, x, y, or blankTop, bottom, start (left), end (right), horizontal, vertical, or all sides
breakpointsm, md, lg, xl, xxlOptional — applies from this breakpoint up
size05, auto0 = none, 1 = 0.25 rem, 2 = 0.5 rem, 3 = 1 rem, 4 = 1.5 rem, 5 = 3 rem

Examples

ClassEffect
mt-3Top margin of 1 rem
mb-5Bottom margin of 3 rem
p-41.5 rem padding on all sides
px-3 py-51 rem horizontal + 3 rem vertical padding
ms-autoPush element to the right
mx-autoCentre horizontally
pt-md-41.5 rem top padding from medium breakpoint up

Text utilities

ClassEffect
text-startLeft-align text
text-centerCentre-align text
text-endRight-align text
text-whiteWhite text
text-mutedMuted (grey) text
text-primaryPrimary colour text
fw-boldBold font weight
fs-1 through fs-6Font sizes matching <h1> through <h6>
text-uppercaseUppercase text
text-truncateEllipsis-truncate overflowing text

Background colours

ClassEffect
bg-primaryPrimary brand colour
bg-secondarySecondary colour
bg-successGreen success
bg-dangerRed danger
bg-warningYellow warning
bg-infoCyan info
bg-lightLight grey
bg-darkDark/black
bg-whiteWhite
bg-transparentTransparent

Borders

ClassEffect
borderDefault border on all sides
border-0Remove all borders
border-topBorder on top only
roundedRounded corners
rounded-3Medium radius
rounded-circleFull circle crop
rounded-pillPill shape
border-primaryPrimary colour border
border-22 px border width

Display and visibility

ClassEffect
d-noneHide element
d-blockShow as block
d-flexFlexbox container
d-inline-flexInline flexbox
d-none d-md-blockHidden below medium, visible from medium up
d-md-noneHidden from medium up

Responsive visibility pattern

Combine d-none with a breakpoint display class to show content only at certain screen sizes:

Flexbox utilities

ClassEffect
d-flexEnable flexbox
flex-rowHorizontal direction
flex-columnVertical direction
justify-content-centerCentre items horizontally
justify-content-betweenSpace items evenly
align-items-centerCentre items vertically
gap-2Gap of 0.5 rem between flex items
gap-3Gap of 1 rem
flex-wrapAllow wrapping to next line

Sizing

ClassEffect
w-25, w-50, w-75, w-100Width as percentage
h-100Full height
mw-100Max width 100%
min-vh-100Minimum height of full viewport

Shadows

ClassEffect
shadow-noneNo shadow
shadow-smSmall shadow
shadowMedium shadow
shadow-lgLarge shadow

Combining classes

The className field accepts multiple classes separated by spaces. Combine them freely:
This gives a 1.5 rem top margin, 0.5 rem bottom margin, centred text, light background, rounded corners, a small shadow, and 1.5 rem padding.
Responsive prefixes work on most utilities. For example, text-center text-md-start centres text on mobile but left-aligns it from medium breakpoint up.