Skip to content
Dalvan UI

Foundations

Dalvan UI combines component classes, standalone utilities, and CSS custom properties. The React Foundations show how the same choices map to props.

Component classes

Start with the base class. Add at most one size, one palette, and one appearance. You can combine the three groups independently.

<span class="dv-chip dv-chip--sm dv-color-success dv-appearance-subtle">
  Published
</span>

In this example, dv-chip sets the structure, dv-chip--sm sets the size, dv-color-success picks the palette, and dv-appearance-subtle uses that palette for a tinted surface. Each component guide lists its options and defaults.

Utilities

Use utilities such as dv-flex, dv-gap-100, and dv-p-200 to arrange components. For utilities with responsive variants, use a breakpoint prefix such as dv-md-flex-row to apply the rule from that breakpoint upward. See the CSS Utilities guide for the available classes and breakpoints.

Design tokens

Primitive tokens such as --dv-space-200 provide values from a shared scale. Semantic tokens such as --dv-color-paper describe a role. Component tokens such as --dv-card-padding control a specific component. Override a component token on the instance that uses it and set shared tokens on a parent when several components should inherit them.

Theme scope

Define your own theme by targeting an attribute on a container. Put the attribute on <html> for a page-wide theme or on a section to limit its scope. Load the theme rules after the Dalvan UI stylesheet.

[data-dv-theme="editorial"] {
  --dv-font-family-body: Georgia, serif;
  --dv-radius-md: 1rem;
}
<section data-dv-theme="editorial">
  <article class="dv-card">
    <div class="dv-card__body dv-text-body-md">Project summary</div>
  </article>
</section>

Try these conventions in the HTML/CSS Quick Start.