Skip to content

Sizing

Current sizing uses Tailwind width/height and container max-widths. No custom sizing tokens yet — values below are implementation conventions, not formal Davinci tokens.

Introduction#

Sizing covers fixed control heights, fluid widths, and container constraints. DavinciUI currently relies on Tailwind’s w-* / h-* scale and max-w-* containers. Future tokens will alias these.

Width#

w-full

Fills container

w-fit

w-fit

w-screen

100vw

Fractional

w-1/2
w-1/2

Height#

Heights — content-driven and fixed

h-16
h-24

h-full / min-h-screen

Component Sizing#

Control heights — current conventions for buttons/inputs.

Small
h-8 (32px)
Default
h-9 (36px)
Large
h-10 (40px)
XL
h-12 (48px)
Full
w-full

Container Sizes#

Max-width containers for readable layouts.

max-w-sm — 384px

Forms

max-w-2xl — 672px

Prose

max-w-6xl — 1152px

Docs content (current)

Responsive Sizing#

Elements adapt at Tailwind breakpoints (sm 640 md 768 lg 1024).

1 col → 2 → 4

className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4"

Guidelines#

  • Use h-8 / h-9 / h-10 for controls — keep touch target ≥ 32px.
  • Prefer w-full max-w-* over fixed widths for responsiveness.
  • Use fractional basis-1/2 for split views (docs preview).
  • Containers: max-w-sm forms, max-w-2xl prose, max-w-6xl docs.