Dragonglass

Utilities

Find focused spacing, layout, border, typography, elevation and color adjustments.

Find a utility

The reference groups every documented utility family by purpose. Each table shows the class pattern, accepted values and available variants.

Compose focused adjustments

A utility class changes one visual property or a small related set.

<article class="relative z-1 p-4 shadow-base bg-default-lightest">
  <h2 class="text-xl font-semibold leading-tight text-primary-dark">Project summary</h2>
  <p class="mt-2 mb-4 text-default-dark">Utilities make focused visual adjustments.</p>
  <button class="bg-primary hover:bg-primary-dark focus:outline-2 focus:outline-primary">
    Open project
  </button>
</article>

Constrain content width

Use container for the common fluid and centered page width. Combine max-w-* with mx-auto when an element needs a different limit. These classes add no padding.

<section class="container">
  <h2>Application content</h2>
  <p>The container stays fluid until it reaches the configured maximum width.</p>
</section>

<p class="max-w-prose mx-auto">
  This text measure stays readable and preserves its vertical margins.
</p>

Prefixes and special characters

Interactive variants place focus:, active: or hover: before a supported class. Color utilities also accept before: and after:. Fractional widths accept the responsive prefixes sm:, md:, lg: and xl:.

Colons and slashes appear directly inside the HTML class attribute. Authored CSS and DOM selectors use their escaped forms.

<div class="grid-gutters">
  <section class="w-6/12 md:w-4/12 xl:w-3/12 p-4">Responsive column</section>
</div>

Motion

Motion tokens give components shared timing semantics. Components transition only their documented properties and honor the user's reduced-motion preference.

Motion utility families
NameTypeDefaultDescription
--motion-duration-{speed}Duration tokeninstant (0ms), fast (120ms), base (200ms), deliberate (280ms)Selects an instant, compact, standard or emphasized duration. Override a token at an appropriate scope to tune component motion without applying a transition to every property. Variants: CSS custom property
--motion-easing-{intent}Easing tokenstandard (ease-in-out), enter (ease-out), exit (ease-in)Selects the easing for a state change, an entering surface or an exiting surface. Variants: CSS custom property

Spacing

Spacing utilities read the shared spacing scale and apply one physical side or every side.

Spacing utility families
NameTypeDefaultDescription
p-{size} | pt-{size} | pr-{size} | pb-{size} | pl-{size}Padding0, px, 1, 2, 3, 4, 5, 6, 8, 10, 12, 16Sets padding on every side, top, right, bottom or left respectively. Variants: Base only
m-{size} | mt-{size} | mr-{size} | mb-{size} | ml-{size}Margin0, px, 1, 2, 3, 4, 5, 6, 8, 10, 12, 16Sets margin on every side, top, right, bottom or left respectively. Variants: Base only

Layout and stacking

Layout utilities control positioning, stacking, fractional width and compact display behavior.

Layout and stacking utility families
NameTypeDefaultDescription
containerCentered container100% width, var(--container-max-width) maximumCenters content with logical auto margins and adds no padding. Variants: Base only
max-w-{size}Maximum widthsm (36rem), md (48rem), lg (64rem), xl (80rem), prose (65ch)Limits width without changing the element width or margins. Variants: Base only
mx-autoHorizontal centeringmargin-inline: autoCenters a width-constrained element without changing vertical margins. Variants: Base only
relative | static | absolute | fixed | stickyPositionThe class name is the position valueSets the position property directly. Variants: Base only
z-{level}Z-indexauto, negative-10, negative-1, 0, 1, 2, 3, 4, 6, 8, 12, 16, 1000Sets a documented z-index from the framework scale. Variants: Base only
w-{part}/{whole}Fractional widthwhole: 2 through 12; part: 1 through whole - 1Sets a fractional width. Responsive variants start at 576px, 768px, 992px and 1200px. Variants: Base, sm:, md:, lg:, xl:
inlineInline displayNo valueUses inline-block display, resets positioned offsets and aligns the element vertically. Variants: Base only
w-full | h-full | h-autoFull and automatic sizing100% width, 100% height, automatic heightControls the media box before applying object-fit or background utilities. Variants: Base only
h-{size} | min-h-{size}Height and minimum height8 (2rem), 12 (3rem), 16 (4rem), 24 (6rem), 32 (8rem), 48 (12rem), 64 (16rem), 96 (24rem), 128 (32rem)Sets height or minimum height from the quarter-rem framework scale. Variants: Base only
h-{viewport} | min-h-{viewport}Viewport height and minimum heighthalf-screen (50svh), three-quarter-screen (75svh), screen (100svh)Sets height or minimum height relative to the small viewport. Variants: Base only
u-scrollableHeight helpermax-height: 360remSets a maximum height while overflow behavior remains unchanged. Variants: Base only

Grid containers

Grid classes create wrapping flex rows whose direct children start at full width.

Grid containers utility families
NameTypeDefaultDescription
gridGrid containerStart alignment without guttersCreates the base wrapping row. Variants: Base only
grid-center | grid-endGrid alignmentcenter, endAligns grid children along the row. The base grid class uses start alignment. Variants: Base only
grid-guttersGuttered grid0.8rem child paddingCreates a grid row with consistent horizontal gutters. Variants: Base only

Images and backgrounds

Media utilities control image fitting, focal position, background sizing and repetition.

Images and backgrounds utility families
NameTypeDefaultDescription
object-{fit}Object fitcover, contain, fill, none, scale-downSets object-fit on replaced elements such as img. Variants: Base only
object-{position}Object positiontop-left, top, top-right, left, center, right, bottom-left, bottom, bottom-rightSelects the visible focal point inside an image box. Variants: Base only
bg-auto | bg-cover | bg-containBackground sizeauto, cover, containSets background-size without changing the image source. Variants: Base only
bg-{position}Background positiontop-left, top, top-right, left, center, right, bottom-left, bottom, bottom-rightSelects the background image focal point. Variants: Base only
bg-repeat | bg-no-repeatBackground repeatrepeat, no-repeatControls background image repetition. Variants: Base only

Borders and outlines

Border and outline utilities separate width, style, offset and color for explicit composition.

Borders and outlines utility families
NameTypeDefaultDescription
borderBorder shorthand1px-scale width and solid styleAdds the default solid border. Variants: Base, focus:, active:, hover:
border-{size}Border width0 through 13Sets border width from the border scale. Variants: Base, focus:, active:, hover:
outlineOutline shorthand1px-scale width and solid styleAdds the default solid outline. Variants: Base, focus:, active:, hover:
outline-noneOutline removalnoneRemoves the outline. Variants: Base, focus:, active:, hover:
outline-{size}Outline width0 through 13Sets outline width and a solid outline style. Variants: Base, focus:, active:, hover:
outline-{style}Outline stylesolid, dashed, dotted, doubleSets the outline style. Variants: Base, focus:, active:, hover:
outline-offset-{size}Outline offset0, px, 1, 2, 3, 4, 5, 6, 8, 10, 12, 16Offsets the outline with a value from the spacing scale. Variants: Base, focus:, active:, hover:

Typography

Typography utilities control one font or text property and support interactive state variants.

Typography utility families
NameTypeDefaultDescription
text-{size}Font size2xs, xs, sm, base, lg, xl, 2xl, 3xl, 4xl, 5xl, 6xlSets font size from the framework scale. Variants: Base, focus:, active:, hover:
normal-style | italic | obliqueFont stylenormal, italic, obliqueSets font style. Variants: Base, focus:, active:, hover:
font-{weight}Font weightthin, extralight, light, normal, medium, semibold, bold, extrabold, blackSets numeric font weight from 100 through 900. Variants: Base, focus:, active:, hover:
normal-case | capitalize | uppercase | lowercaseText transformnone, capitalize, uppercase, lowercaseChanges visual casing without changing source text. Variants: Base, focus:, active:, hover:
leading-{height}Line heightnone, tight, snug, normal, relaxed, looseSets line height from 1 through 2. Variants: Base, focus:, active:, hover:
text-{alignment}Text alignmentleft, right, center, justifySets physical text alignment. Variants: Base, focus:, active:, hover:

Elevation

Elevation utilities use token-backed outer and inset shadows with interactive state variants.

Elevation utility families
NameTypeDefaultDescription
shadow-{size}Outer shadow2xs, xs, sm, base, lg, xl, 2xl, 3xlApplies an outer shadow and its matching stacking level. Variants: Base, focus:, active:, hover:
shadow-inner-{size}Inset shadow2xs, xs, sm, base, lg, xl, 2xl, 3xlApplies an inset shadow. Variants: Base, focus:, active:, hover:
shadow-noneShadow removalnoneRemoves box shadow. Variants: Base, focus:, active:, hover:
text-shadow-sm | text-shadow-base | text-shadow-lgText shadowsm, base, lgApplies a compact token-colored shadow to improve text separation over media. Variants: Base only
text-shadow-noneText shadow removalnoneRemoves text shadow, including low-specificity defaults. Variants: Base only

Colors

Color utilities cover backgrounds, borders, outlines and text across every semantic family and weight.

Colors utility families
NameTypeDefaultDescription
{kind}-{family}{weight}Semantic colorkind: bg, border, outline, text; family: primary, accent, success, info, warning, danger, default; weight: lightest, lighter, light, base, dark, darker, darkestApplies the selected semantic token. Base weight omits the weight suffix, such as bg-primary. Border colors require a border style to become visible. Variants: Base, focus:, active:, hover:, before:, after:
{kind}-white | {kind}-blackLiteral colorkind: bg, border, outline, textApplies the literal white or black token. These utilities remain unchanged across color schemes. Variants: Base, focus:, active:, hover:, before:, after:
bg-transparent | bg-scrim | bg-media-scrimTransparent backgroundtransparent, var(--scrim), var(--media-scrim)Sets only the background color and preserves the current text color. Variants: Base only