Skip to content

Utilities

Small classes that each do one thing, to build without writing CSS. If it is your first time, start with Building with utilities: it explains how to read the names, the scale, screen sizes and variants.

View on GitHub
On this page

Here they all are, grouped by what you want to do.

Placing things

I want to… Page For example
Add space with margin or padding Spacing gm-mt-4, gm-px-6
Put things in a row or a column and align them Flex and alignment gm-d-flex gm-items-center gm-gap-3
Make columns Grid gm-d-grid gm-md-grid-cols-3
Place on top of something, fixed or sticky Position and layers gm-absolute gm-inset-0, gm-z-10
Show or hide depending on the screen Display gm-d-none gm-md-d-block

Sizes

I want to… Page For example
Width, height, minimums and maximums Sizing gm-w-full, gm-max-w-md
A ratio, or an image that fills its box Images and video gm-aspect-video, gm-object-cover
Clip or scroll what does not fit Overflow gm-overflow-hidden

Text

I want to… Page For example
Size, weight, line height and shape Text gm-text-xl gm-font-bold
Text color Text color gm-text-muted, gm-text-sky

Color and background

I want to… Page For example
A background color (with its text on top) Background gm-bg-surface, gm-bg-sky
My own gradient Gradients gm-bg-linear-to-r gm-from-sky gm-to-lavender
A background image and how it sits Backgrounds gm-bg-cover gm-bg-center
A theme's colors (pastel or glass) Theme gm-theme-mint gm-theme-solid

Borders and shadows

I want to… Page For example
Borders and rounded corners Borders and radius gm-border gm-rounded-lg
Shadows, colored ones too Shadows gm-shadow-md, gm-shadow-sky

Effects and motion

I want to… Page For example
Glass, background blur and opacity Effects gm-glass, gm-opacity-75
Blur, brighten or turn to gray Filters gm-grayscale
Fade towards one side or blend colors Masks and blending gm-mask-to-b
Rotate, scale, move and smooth the changes Transforms and transitions gm-rotate-6 gm-transition
Make something appear or catch the eye Animations gm-animate-fade-in
The cursor, selection or visibility Interaction and visibility gm-cursor-pointer

What is not on the scale

I want to… Page For example
An exact value, any property, on hover or in dark mode Arbitrary values gm-mt-[1.75rem], gm-hover:shadow-[…], gm-dark:bg-[#0b0b0c]