Responsive utilities
Base utilities apply at all widths. Add the breakpoint after dv-, as in dv-md-grid-cols-3, to override the base value from that width upward. Display, flex, grid, spacing, and text alignment support breakpoint prefixes.
| Prefix | Minimum viewport width |
|---|---|
sm | 640px |
md | 1024px |
lg | 1440px |
xl | 1920px |
Display
Use one display class per breakpoint. The example stacks its two items below md and displays them in a flex row from md upward.
<div class="dv-block dv-md-flex dv-gap-150">
<div class="dv-p-100 dv-appearance-paper">Project overview</div>
<div class="dv-p-100 dv-appearance-paper">Recent activity</div>
</div> | Class or pattern | Behavior |
|---|---|
dv-blockdv-inline-blockdv-inline | Normal flow display modes. |
dv-flexdv-inline-flexdv-griddv-inline-grid | Flex and grid containers. |
dv-flow-rootdv-contentsdv-list-item | Independent formatting context, contents-only display, or list-item display. |
dv-tabledv-inline-tabledv-table-captiondv-table-column-groupdv-table-columndv-table-header-groupdv-table-row-groupdv-table-footer-groupdv-table-rowdv-table-cell | CSS table display modes. Use native table markup for tabular data. |
dv-hidden | Uses display: none. Pair with a responsive display class to show content from a breakpoint. |
Flexbox
Start with dv-flex or dv-inline-flex. Use direction, wrapping, and alignment classes on the container. Apply growth, shrink, or self-alignment to individual items.
<div class="dv-flex dv-flex-wrap dv-align-items-center dv-gap-100">
<span class="dv-flex-grow-1 dv-text-label-md">Project status</span>
<span class="dv-chip dv-color-success dv-appearance-subtle">Published</span>
</div> | Class or pattern | Behavior |
|---|---|
dv-flex-{row,row-reverse,column,column-reverse} | Sets the main axis and direction. |
dv-flex-{nowrap,wrap,wrap-reverse} | Controls whether and where the items wrap. |
dv-justify-content-{start,end,center,space-between,space-around,space-evenly} | Aligns or distributes items along the main axis. |
dv-align-items-{start,end,center,baseline,stretch} | Aligns items along the cross axis. |
dv-align-self-{auto,start,end,center,baseline,stretch} | Overrides cross-axis alignment for an individual item. |
dv-flex-grow-{0,1}dv-flex-shrink-{0,1} | Controls whether an item grows or shrinks. |
Grid
Start with dv-grid or dv-inline-grid. Set tracks on the container and spans on its direct children. This example starts with one column and adds three custom columns from md.
<div class="dv-grid dv-grid-cols-1 dv-md-grid-cols-custom dv-gap-100" style="--dv-grid-cols: 3">
<div class="dv-grid-col-span-full dv-p-100 dv-appearance-paper">Release checklist</div>
<div class="dv-md-grid-col-span-2 dv-p-100 dv-appearance-paper">Review documentation</div>
<div class="dv-p-100 dv-appearance-paper">Publish</div>
</div> | Class or pattern | Behavior |
|---|---|
dv-grid-cols-{1–6}dv-grid-rows-{1–6} | Defines equal explicit tracks along the selected axis. |
dv-grid-cols-custom | Uses a positive integer in --dv-grid-cols. Defaults to one column. |
dv-grid-col-span-{1–6,full}dv-grid-row-span-{1–6,full} | Spans the given count or the entire explicit grid along the axis. |
dv-grid-col-autodv-grid-row-auto | Restores automatic placement on that axis. |
Spacing
Use 0 or a token step from 25, 50, 75, 100, 125, 150, 200, 250, 300, 400, 500, 600, 800, and 1000. Margin also accepts auto. Within a breakpoint, single-side utilities override axis utilities, which override all-sides utilities. Row and column gap overrides apply to their respective axes.
Notifications
Weekly project updates are enabled.
<section class="dv-grid dv-gap-100 dv-row-gap-200 dv-p-100 dv-md-p-200 dv-ps-300 dv-md-ps-300 dv-appearance-paper">
<h3 class="dv-m-0 dv-text-heading-sm">Notifications</h3>
<p class="dv-m-0 dv-text-body-md">Weekly project updates are enabled.</p>
</section> | Class or pattern | Behavior |
|---|---|
dv-m-*dv-p-* | Margin or padding on all sides. |
dv-mx-*dv-my-*dv-px-*dv-py-* | Inline and block axes. |
dv-mt-*dv-mb-*dv-pt-*dv-pb-* | Top or bottom edge. |
dv-ms-*dv-me-*dv-ps-*dv-pe-* | Inline start or end, following the writing direction. |
dv-gap-*dv-row-gap-*dv-col-gap-* | Both gaps or a single grid or flex gap axis. |
Typography and text
Select a typography role for the visual style and choose an HTML element that suits the content. Use a width constraint when demonstrating truncation or line clamping.
Documentation for the next project release
Review the installation guide, component examples, and release notes before publishing.
<div class="dv-grid dv-gap-100" style="inline-size: 15rem">
<h3 class="dv-m-0 dv-text-heading-sm dv-truncate">Documentation for the next project release</h3>
<p class="dv-m-0 dv-text-body-md dv-line-clamp-2">
Review the installation guide, component examples, and release notes before publishing.
</p>
</div> | Class or pattern | Behavior |
|---|---|
dv-text-{body,heading,label,display}-{xs,sm,md,lg} | Sets the type family, weight, size, and line height for a role. |
dv-text-{start,center,end,justify} | Sets alignment. Start and end follow writing direction. |
dv-whitespace-nowrapdv-break-word | Keeps text on one line or allows long words to break when necessary. |
dv-truncate | Displays a single line with an ellipsis when its available width is constrained. |
dv-line-clamp-{2,3,4}dv-line-clamp-custom | Limits visible lines. Put the utility on the text element inside the layout container. Custom uses a positive integer in --dv-line-clamp and defaults to two lines. |
Color and appearance
Set a palette on the element or an ancestor. Choose an appearance to apply foreground and background styles. Use an interactive appearance on native controls that can actually be activated.
<div class="dv-grid dv-gap-100 dv-color-primary">
<div class="dv-p-100 dv-appearance-subtle">Project settings</div>
<p class="dv-m-0 dv-muted">Changes apply to this project.</p>
<a class="dv-p-100 dv-appearance-ghost dv-appearance-interactive" href="#breakpoints">View breakpoints</a>
</div> | Class or pattern | Behavior |
|---|---|
dv-color-{primary,neutral,success,warning,danger} | Sets the palette consumed by appearances and palette-aware components. |
dv-appearance-soliddv-appearance-subtledv-appearance-paper | Uses a filled palette surface, a tinted surface, or the paper surface. |
dv-appearance-plaindv-appearance-textdv-appearance-ghost | Transparent at rest. Plain uses palette tone 500, text uses tone 800, and ghost follows the surrounding text color. |
dv-appearance-interactive | Adds hover and pressed appearance states. Pair with an appearance class. |
dv-muted | Mixes the inherited text color with transparent. The --dv-color-muted-weight token defaults to 85%. |