Utilities
Spacing, layout, sizing, typography, borders, effects and responsive helpers - every utility class the framework ships, grouped by family.
Two conventions run through all of them: a numeric scale where 1 = 0.25rem and 4 = 1rem, and a responsive prefix (ar-md:*, ar-lg:*). Color helpers live in the Colors guide, and each theme ships its own helper family (ar-neo-* ar-pixel-* ar-brutalist-* - listed on its theme page).
Spacing
Padding and margin on the shared rem scale. Only the listed numbers exist: 0 1 2 3 4 5 6 8 10 12 (12 = 3rem). Axes: nothing (ar-p-4), x/y (ar-px-4 ar-py-2), or one side (ar-mt-4 ar-mb-2 ar-pt-2 ar-pb-0).
ar-mx-auto centers a block; ar-mt-4 adds top space.
<div class="ar-flex ar-flex-wrap ar-gap-4">
<div class="ar-p-8 ar-bg-base-200 ar-rounded">ar-p-8</div>
<div class="ar-px-6 ar-py-2 ar-bg-base-200 ar-rounded">ar-px-6 ar-py-2</div>
<div class="ar-p-2 ar-bg-base-200 ar-rounded">ar-p-2</div>
</div>
<p class="ar-mt-4 ar-text-gray-600"><code>ar-mx-auto</code> centers a block; <code>ar-mt-4</code> adds top space.</p><div className="ar-flex ar-flex-wrap ar-gap-4">
<div className="ar-p-8 ar-bg-base-200 ar-rounded">ar-p-8</div>
<div className="ar-px-6 ar-py-2 ar-bg-base-200 ar-rounded">ar-px-6 ar-py-2</div>
<div className="ar-p-2 ar-bg-base-200 ar-rounded">ar-p-2</div>
</div>
<p className="ar-mt-4 ar-text-gray-600"><code>ar-mx-auto</code> centers a block; <code>ar-mt-4</code> adds top space.</p>| Class | Description |
|---|---|
ar-p-0 | padding 0 |
ar-p-1 | padding 0.25rem |
ar-p-2 | padding 0.5rem |
ar-p-3 | padding 0.75rem |
ar-p-4 | padding 1rem |
ar-p-5 | padding 1.25rem |
ar-p-6 | padding 1.5rem |
ar-p-8 | padding 2rem |
ar-p-10 | padding 2.5rem |
ar-p-12 | padding 3rem |
ar-px-1 | horizontal padding 0.25rem |
ar-px-2 | horizontal padding 0.5rem |
ar-px-3 | horizontal padding 0.75rem |
ar-px-4 | horizontal padding 1rem |
ar-px-6 | horizontal padding 1.5rem |
ar-px-8 | horizontal padding 2rem |
ar-py-1 | vertical padding 0.25rem |
ar-py-2 | vertical padding 0.5rem |
ar-py-3 | vertical padding 0.75rem |
ar-py-4 | vertical padding 1rem |
ar-py-6 | vertical padding 1.5rem |
ar-py-8 | vertical padding 2rem |
ar-py-12 | vertical padding 3rem |
ar-pt-2 | top padding 0.5rem |
ar-pt-10 | top padding 2.5rem |
ar-pb-0 | bottom padding 0 |
ar-pb-2 | bottom padding 0.5rem |
ar-m-0 | margin 0 |
ar-m-2 | margin 0.5rem |
ar-m-4 | margin 1rem |
ar-mt-1 | top margin 0.25rem |
ar-mt-2 | top margin 0.5rem |
ar-mt-3 | top margin 0.75rem |
ar-mt-4 | top margin 1rem |
ar-mt-6 | top margin 1.5rem |
ar-mt-8 | top margin 2rem |
ar-mb-2 | bottom margin 0.5rem |
ar-mb-4 | bottom margin 1rem |
ar-mb-8 | bottom margin 2rem |
ar-my-1 | vertical margin 0.25rem |
ar-my-2 | vertical margin 0.5rem |
ar-my-4 | vertical margin 1rem |
ar-my-10 | vertical margin 2.5rem |
ar-mx-auto | horizontal margins auto — centers a block |
Layout, flex & grid
Display modes, flexbox, CSS grid and the gap scale.
flex justify-between
badge<div class="ar-flex ar-justify-between ar-items-center">
<h2 class="ar-font-semibold">flex justify-between</h2>
<span class="ar-badge ar-badge-outline">badge</span>
</div><div className="ar-flex ar-justify-between ar-items-center">
<h2 className="ar-font-semibold">flex justify-between</h2>
<span className="ar-badge ar-badge-outline">badge</span>
</div><div class="ar-grid ar-grid-cols-3 ar-gap-4">
<div class="ar-bg-base-200 ar-p-4 ar-rounded">1</div>
<div class="ar-bg-base-200 ar-p-4 ar-rounded">2</div>
<div class="ar-bg-base-200 ar-p-4 ar-rounded">3</div>
</div><div className="ar-grid ar-grid-cols-3 ar-gap-4">
<div className="ar-bg-base-200 ar-p-4 ar-rounded">1</div>
<div className="ar-bg-base-200 ar-p-4 ar-rounded">2</div>
<div className="ar-bg-base-200 ar-p-4 ar-rounded">3</div>
</div>| Class | Description |
|---|---|
ar-flex | display: flex |
ar-inline-flex | display: inline-flex |
ar-grid | display: grid |
ar-block | display: block |
ar-inline-block | display: inline-block |
ar-hidden | display: none |
ar-flex-col | stack flex children vertically |
ar-flex-row | flex children in a row |
ar-flex-wrap | let flex lines wrap |
ar-flex-1 | grow to fill the line (flex: 1 1 0%) |
ar-shrink-0 | never shrink |
ar-items-start | cross-axis: align to start |
ar-items-center | cross-axis: center |
ar-items-end | cross-axis: align to end |
ar-justify-start | main axis: pack to start |
ar-justify-center | main axis: center |
ar-justify-between | main axis: space between |
ar-justify-end | main axis: pack to end |
ar-grid-cols-1 | grid with 1 equal column |
ar-grid-cols-2 | grid with 2 equal columns |
ar-grid-cols-3 | grid with 3 equal columns |
ar-grid-cols-4 | grid with 4 equal columns |
ar-grid-flow-col | grid auto-flows in columns |
ar-gap-1 | gap 0.25rem |
ar-gap-2 | gap 0.5rem |
ar-gap-3 | gap 0.75rem |
ar-gap-4 | gap 1rem |
ar-gap-6 | gap 1.5rem |
ar-gap-x-2 | column gap 0.5rem |
ar-gap-x-4 | column gap 1rem |
ar-gap-x-8 | column gap 2rem |
ar-gap-y-8 | row gap 2rem |
ar-gap-y-16 | row gap 4rem |
Sizing
Width, height, min/max-width and overflow. Widths follow the shared --ar-s-* rem scale (n × 0.25rem) with steps 8 16 24 32 40 48 60 80 (2rem → 20rem), plus ar-w-full and fractions (ar-w-1/3 ar-w-11/12). The ar-max-w-* series (sm 24rem → 7xl 80rem) is how the docs cap line length.
<div class="ar-flex ar-gap-4">
<div class="ar-w-1/2 ar-bg-base-200 ar-p-4 ar-rounded">ar-w-1/2</div>
<div class="ar-w-1/3 ar-bg-base-200 ar-p-4 ar-rounded">ar-w-1/3</div>
</div>
<div class="ar-mt-4 ar-max-w-md ar-border ar-rounded ar-p-4">ar-max-w-md</div><div className="ar-flex ar-gap-4">
<div className="ar-w-1/2 ar-bg-base-200 ar-p-4 ar-rounded">ar-w-1/2</div>
<div className="ar-w-1/3 ar-bg-base-200 ar-p-4 ar-rounded">ar-w-1/3</div>
</div>
<div className="ar-mt-4 ar-max-w-md ar-border ar-rounded ar-p-4">ar-max-w-md</div>| Class | Description |
|---|---|
ar-w-8 | width 2rem |
ar-w-16 | width 4rem |
ar-w-24 | width 6rem |
ar-w-32 | width 8rem |
ar-w-40 | width 10rem |
ar-w-48 | width 12rem |
ar-w-60 | width 15rem |
ar-w-80 | width 20rem |
ar-w-full | width 100% |
ar-w-1/3 | width 33.3% |
ar-w-2/3 | width 66.7% |
ar-w-1/2 | width 50% |
ar-w-11/12 | width 91.7% |
ar-h-8 | height 2rem |
ar-h-48 | height 12rem |
ar-h-full | height 100% |
ar-min-h-full | min-height 100% |
ar-min-h-screen | min-height 100vh |
ar-max-w-none | no max width |
ar-max-w-sm | max-width 24rem |
ar-max-w-md | max-width 28rem |
ar-max-w-lg | max-width 32rem |
ar-max-w-xl | max-width 36rem |
ar-max-w-2xl | max-width 42rem |
ar-max-w-3xl | max-width 48rem |
ar-max-w-4xl | max-width 56rem |
ar-max-w-5xl | max-width 64rem |
ar-max-w-6xl | max-width 72rem |
ar-max-w-7xl | max-width 80rem |
ar-aspect-video | 16:9 aspect ratio |
ar-object-cover | images cover the box (object-fit: cover) |
ar-overflow-hidden | clip overflow |
ar-overflow-x-auto | horizontal scrollbar when content overflows |
Typography
The type scale (ar-text-xs → ar-text-9xl, plus the marketing-size ar-text-hero), weights, alignment, wrapping and a few text extras.
ar-text-xs
ar-text-sm
ar-text-base
ar-text-lg
ar-text-2xl ar-font-bold
ar-text-center
ar-leading-tight ar-tracking-wider
<p class="ar-text-xs">ar-text-xs</p>
<p class="ar-text-sm">ar-text-sm</p>
<p class="ar-text-base">ar-text-base</p>
<p class="ar-text-lg">ar-text-lg</p>
<p class="ar-text-2xl ar-font-bold">ar-text-2xl ar-font-bold</p>
<p class="ar-text-center ar-text-gray-600">ar-text-center</p>
<p class="ar-leading-tight ar-tracking-wider">ar-leading-tight ar-tracking-wider</p><p className="ar-text-xs">ar-text-xs</p>
<p className="ar-text-sm">ar-text-sm</p>
<p className="ar-text-base">ar-text-base</p>
<p className="ar-text-lg">ar-text-lg</p>
<p className="ar-text-2xl ar-font-bold">ar-text-2xl ar-font-bold</p>
<p className="ar-text-center ar-text-gray-600">ar-text-center</p>
<p className="ar-leading-tight ar-tracking-wider">ar-leading-tight ar-tracking-wider</p>| Class | Description |
|---|---|
ar-text-xs | font-size 0.75rem |
ar-text-sm | font-size 0.875rem |
ar-text-base | font-size 1rem |
ar-text-lg | font-size 1.125rem |
ar-text-xl | font-size 1.25rem |
ar-text-2xl | font-size 1.5rem |
ar-text-3xl | font-size 1.875rem |
ar-text-4xl | font-size 2.25rem |
ar-text-5xl | font-size 3rem |
ar-text-6xl | font-size 3.75rem |
ar-text-7xl | font-size 4.5rem |
ar-text-8xl | font-size 6rem |
ar-text-9xl | font-size 8rem |
ar-text-hero | clamp(3rem, 11vw, 6.5rem) — marketing size |
ar-font-thin | font-weight 100 |
ar-font-normal | font-weight 400 |
ar-font-medium | font-weight 500 |
ar-font-semibold | font-weight 600 |
ar-font-bold | font-weight 700 |
ar-text-left | align text left |
ar-text-center | align text center |
ar-text-right | align text right |
ar-text-pretty | prettier line breaks (text-wrap: pretty) |
ar-text-wrap | normal wrapping (text-wrap: wrap) |
ar-leading-tight | line-height 1.25 |
ar-leading-6 | line-height 1.5rem |
ar-tracking-wide | letter-spacing 0.025em |
ar-tracking-wider | letter-spacing 0.05em |
ar-underline | underline the text |
ar-no-underline | remove the underline |
ar-list-none | no list bullets |
ar-tabular-nums | even-width numerals (tabular-nums) |
Borders & rounded
Border width and sides, the radius scale, and the shadow ladder. Border width follows the theme (1px by default, 3px on neo, 2px on pixel).
<div class="ar-flex ar-flex-wrap ar-gap-4">
<div class="ar-border ar-rounded ar-p-4">ar-border ar-rounded</div>
<div class="ar-border-2 ar-rounded-lg ar-p-4">ar-border-2 ar-rounded-lg</div>
<div class="ar-border ar-rounded-full ar-px-4 ar-py-2">ar-rounded-full</div>
<div class="ar-bg-base-100 ar-shadow-lg ar-rounded ar-p-4">ar-shadow-lg</div>
</div><div className="ar-flex ar-flex-wrap ar-gap-4">
<div className="ar-border ar-rounded ar-p-4">ar-border ar-rounded</div>
<div className="ar-border-2 ar-rounded-lg ar-p-4">ar-border-2 ar-rounded-lg</div>
<div className="ar-border ar-rounded-full ar-px-4 ar-py-2">ar-rounded-full</div>
<div className="ar-bg-base-100 ar-shadow-lg ar-rounded ar-p-4">ar-shadow-lg</div>
</div>| Class | Description |
|---|---|
ar-border | solid border, theme width (1px by default) |
ar-border-2 | 2px solid border |
ar-border-t | top border, theme width |
ar-border-t-0 | no top border |
ar-border-b | bottom border, theme width |
ar-border-base-content | border color: base-content |
ar-border-neutral | border color: neutral |
ar-border-gray-200 | border color: gray-200 |
ar-border-gray-300 | border color: gray-300 |
ar-border-base-300 | border color: base-300 |
ar-rounded | radius 0.25rem (field) |
ar-rounded-lg | radius 0.5rem (box) |
ar-rounded-xl | radius 0.75rem |
ar-rounded-box | radius 0.5rem (box) |
ar-rounded-full | pill radius (9999px) |
ar-shadow-sm | sm shadow |
ar-shadow-md | md shadow |
ar-shadow-lg | lg shadow |
ar-shadow-xl | xl shadow |
ar-shadow-2xl | 2xl shadow (largest) |
Position, opacity & motion
Positioning helpers, z-index, opacity, transitions and a few odds and ends (ar-cursor-pointer ar-whitespace-nowrap ar-sr-only ar-scroll-smooth).
<div class="ar-relative ar-border ar-rounded ar-p-4" style="min-height: 6rem">
<span class="ar-absolute ar-top-0 ar-left-5 ar-z-10 ar-badge ar-badge-primary">ar-absolute ar-top-0 ar-left-5</span>
<span class="ar-opacity-30">ar-opacity-30</span>
</div><div className="ar-relative ar-border ar-rounded ar-p-4" style={{ minHeight: "6rem" }}>
<span className="ar-absolute ar-top-0 ar-left-5 ar-z-10 ar-badge ar-badge-primary">ar-absolute ar-top-0 ar-left-5</span>
<span className="ar-opacity-30">ar-opacity-30</span>
</div>| Class | Description |
|---|---|
ar-relative | position: relative |
ar-absolute | position: absolute |
ar-fixed | position: fixed |
ar-sticky | sticky header: top: 0 + z-index 50 |
ar-inset-0 | pin to all edges (inset: 0) |
ar-top-0 | top: 0 |
ar-bottom-0 | bottom: 0 |
ar-left-0 | left: 0 |
ar-right-0 | right: 0 |
ar-top-1/2 | top: 50% |
ar-left-5 | left: 1.25rem |
ar-right-5 | right: 1.25rem |
ar-z-10 | z-index 10 |
ar-z-20 | z-index 20 |
ar-z-50 | z-index 50 |
ar-opacity-0 | fully transparent |
ar-opacity-30 | 30% opacity |
ar-opacity-60 | 60% opacity |
ar-transition-all | transition everything, 0.3s ease |
ar-transition-transform | transition transform only, 0.3s ease |
ar-duration-300 | transition duration 0.3s |
ar-duration-500 | transition duration 0.5s |
ar-ease-out | ease-out timing function |
ar-ease-in-out | ease-in-out timing function |
ar-cursor-pointer | pointer cursor |
ar-whitespace-nowrap | never wrap the text |
ar-sr-only | screen-reader only (visually hidden) |
ar-scroll-smooth | smooth scrolling — applied only when prefers-reduced-motion allows it |
Hover states
One-shot hover helpers - hover only, no prefix to remember.
<div class="ar-flex ar-gap-4 ar-items-center">
<button class="ar-btn ar-hover-scale-110" type="button">ar-hover-scale-110</button>
<span class="ar-hover-ring ar-p-2 ar-cursor-pointer">ar-hover-ring</span>
<span class="ar-hover-bg-gray-100 ar-p-2 ar-cursor-pointer ar-rounded">ar-hover-bg-gray-100</span>
</div><div className="ar-flex ar-gap-4 ar-items-center">
<button className="ar-btn ar-hover-scale-110" type="button">ar-hover-scale-110</button>
<span className="ar-hover-ring ar-p-2 ar-cursor-pointer">ar-hover-ring</span>
<span className="ar-hover-bg-gray-100 ar-p-2 ar-cursor-pointer ar-rounded">ar-hover-bg-gray-100</span>
</div>| Class | Description |
|---|---|
ar-hover-bounce | on hover: bob up and down (1s loop) |
ar-hover-scale-110 | on hover: scale to 110% |
ar-hover-shadow-xl | on hover: xl shadow |
ar-hover-text-gray-600 | on hover: text gray-600 |
ar-hover-text-neutral | on hover: text neutral |
ar-hover-bg-gray-100 | on hover: background gray-100 |
ar-hover-bg-gray-700 | on hover: background gray-700 |
ar-hover-border-gray-400 | on hover: border gray-400 |
ar-hover-ring | on hover: 1px gray-400 ring + border |
ar-hover-ring-gray-200 | on hover: 1px gray-200 ring |
Responsive
Three breakpoints: xs below 480px, md from 768px, lg from 1024px. Prefix any listed helper with ar-md:* or ar-lg:* (the colon, not a dash), or hide below 480px with ar-hide-xs.
<div class="ar-flex ar-flex-col ar-md:flex-row ar-gap-4">
<div class="ar-flex-1 ar-bg-base-200 ar-p-4 ar-rounded">Resize me - stacks, then ar-md:flex-row</div>
<div class="ar-flex-1 ar-bg-base-200 ar-p-4 ar-rounded">second</div>
</div><div className="ar-flex ar-flex-col ar-md:flex-row ar-gap-4">
<div className="ar-flex-1 ar-bg-base-200 ar-p-4 ar-rounded">Resize me - stacks, then ar-md:flex-row</div>
<div className="ar-flex-1 ar-bg-base-200 ar-p-4 ar-rounded">second</div>
</div>| Class | Description |
|---|---|
ar-hide-xs | hidden below 480px |
ar-md:flex | ≥768px: display flex |
ar-md:flex-col | ≥768px: stack vertically |
ar-md:flex-row | ≥768px: row direction |
ar-md:hidden | ≥768px: display none |
ar-md:grid | ≥768px: display grid |
ar-md:grid-cols-2 | ≥768px: 2 equal columns |
ar-md:items-center | ≥768px: center on the cross axis |
ar-md:w-1/2 | ≥768px: width 50% |
ar-md:w-1/3 | ≥768px: width 33.3% |
ar-md:w-2/3 | ≥768px: width 66.7% |
ar-md:max-w-52 | ≥768px: max-width 13rem |
ar-md:p-8 | ≥768px: padding 2rem |
ar-md:mx-0 | ≥768px: horizontal margins 0 |
ar-md:text-left | ≥768px: align text left |
ar-md:text-center | ≥768px: align text center |
ar-lg:flex | ≥1024px: display flex |
ar-lg:flex-col | ≥1024px: stack vertically |
ar-lg:flex-row | ≥1024px: row direction |
ar-lg:hidden | ≥1024px: display none |
ar-lg:grid | ≥1024px: display grid |
ar-lg:grid-cols-2 | ≥1024px: 2 equal columns |
ar-lg:grid-cols-3 | ≥1024px: 3 equal columns |
ar-lg:grid-cols-4 | ≥1024px: 4 equal columns |
ar-lg:items-center | ≥1024px: center on the cross axis |
ar-lg:justify-between | ≥1024px: space between |
ar-lg:gap-8 | ≥1024px: gap 2rem |
ar-lg:w-1/2 | ≥1024px: width 50% |
ar-lg:w-2/5 | ≥1024px: width 40% |
ar-lg:max-w-none | ≥1024px: no max width |
ar-lg:max-w-lg | ≥1024px: max-width 32rem |
ar-lg:p-8 | ≥1024px: padding 2rem |
ar-lg:p-16 | ≥1024px: padding 4rem |
ar-lg:mx-0 | ≥1024px: horizontal margins 0 |
ar-lg:text-2xl | ≥1024px: font-size 1.5rem |
ar-lg:text-4xl | ≥1024px: font-size 2.25rem |
ar-lg:text-6xl | ≥1024px: font-size 3.75rem |
ar-lg:text-8xl | ≥1024px: font-size 6rem |
ar-lg:text-9xl | ≥1024px: font-size 8rem |
ar-lg:leading-tight | ≥1024px: line-height 1.25 |
ar-lg:text-left | ≥1024px: align text left |
ar-lg:text-center | ≥1024px: align text center |
Animation
Entrance, loop and scroll-reveal helpers.
Entrance: add ar-animate-fade-in and stagger with style="--ar-delay: .2s". Loop: ar-bounce bobs an element up and down forever. Scroll reveal: put data-ar-reveal on any block — it fades up once when scrolled into view (IntersectionObserver in arekui.js, fires once, no configuration). All three settle to their final state under prefers-reduced-motion: reduce, and a page without JavaScript shows everything.
Fades up once when scrolled into view.
<div data-ar-reveal class="ar-p-4 ar-bg-base-200 ar-rounded">
<p class="ar-text-sm ar-text-gray-600">Fades up once when scrolled into view.</p>
</div><div data-ar-reveal className="ar-p-4 ar-bg-base-200 ar-rounded">
<p className="ar-text-sm ar-text-gray-600">Fades up once when scrolled into view.</p>
</div>| Class | Description |
|---|---|
ar-animate-fade-in | fade + slide in once, 0.4s (delay via --ar-delay) |
ar-bounce | loop a small vertical bob, 1s |
ar-reveal | hidden start state for scroll reveal (the script adds it) |
data-ar-reveal | attribute, not a class — the script reveals the block on scroll |