Skip to content
AliasCSS Logo
v1.5.6

Examples /

Navigation

Navbars, sidebars, tabs, breadcrumbs, pagination and steppers.

Tabs

Underlined tabs built from radio inputs: the root shows the panel whose radio is checked, with :has(). Arrow keys move between tabs like any radio group.

<div class="xw-560px w-100% mx-auto --has(_[value=overview]--checked)_[data-panel=overview]-d-block --has(_[value=activity]--checked)_[data-panel=activity]-d-block --has(_[value=settings]--checked)_[data-panel=settings]-d-block">
  <div role="radiogroup" aria-label="Sections" class="d-flex g-24px border-bottom-1px-solid-slateTheme5">
    <label class="position-relative py-10px fs-14px fw-500 c-slateTheme11 cursor-pointer --hover-c-slateTheme12 --has(--checked)[c-slateTheme12,box-shadow(inset_0_-2px_0_currentColor)] --has(--focus-visible)[outline-2px-solid-accentRATheme1000,outline-offset-2px,br-4px]"><input type="radio" name="tab" value="overview" checked class="position-absolute o-0">Overview</label>
    <label class="position-relative py-10px fs-14px fw-500 c-slateTheme11 cursor-pointer --hover-c-slateTheme12 --has(--checked)[c-slateTheme12,box-shadow(inset_0_-2px_0_currentColor)] --has(--focus-visible)[outline-2px-solid-accentRATheme1000,outline-offset-2px,br-4px]"><input type="radio" name="tab" value="activity" class="position-absolute o-0">Activity</label>
    <label class="position-relative py-10px fs-14px fw-500 c-slateTheme11 cursor-pointer --hover-c-slateTheme12 --has(--checked)[c-slateTheme12,box-shadow(inset_0_-2px_0_currentColor)] --has(--focus-visible)[outline-2px-solid-accentRATheme1000,outline-offset-2px,br-4px]"><input type="radio" name="tab" value="settings" class="position-absolute o-0">Settings</label>
  </div>
  <div data-panel="overview" class="d-none pt-16px fs-14px lh-1.6 c-slateTheme11">Your project had <b class="c-slateTheme12">1,284 visits</b> this week, up 12% from last week.</div>
  <div data-panel="activity" class="d-none pt-16px fs-14px lh-1.6 c-slateTheme11">Ada deployed <b class="c-slateTheme12">main</b> 4 minutes ago.</div>
  <div data-panel="settings" class="d-none pt-16px fs-14px lh-1.6 c-slateTheme11">Project name, domains and environment variables.</div>
</div>

Pill tabs with counts

Link tabs for page navigation. The current page is marked with aria-current, and the style follows it.

<nav aria-label="Filter" class="d-flex flex-wrap-wrap g-6px">
  <a href="#" aria-current="page" class="d-inline-flex aic g-8px h-32px px-12px br-999px fs-14px c-slateTheme11 td-none --hover-bgc-slateTheme3 [aria-current=page][bgc-slateTheme12,c-slateTheme1]">All <span class="fs-12px o-0.7">128</span></a>
  <a href="#" class="d-inline-flex aic g-8px h-32px px-12px br-999px fs-14px c-slateTheme11 td-none --hover-bgc-slateTheme3 [aria-current=page][bgc-slateTheme12,c-slateTheme1]">Open <span class="fs-12px o-0.7">24</span></a>
  <a href="#" class="d-inline-flex aic g-8px h-32px px-12px br-999px fs-14px c-slateTheme11 td-none --hover-bgc-slateTheme3 [aria-current=page][bgc-slateTheme12,c-slateTheme1]">In progress <span class="fs-12px o-0.7">9</span></a>
  <a href="#" class="d-inline-flex aic g-8px h-32px px-12px br-999px fs-14px c-slateTheme11 td-none --hover-bgc-slateTheme3 [aria-current=page][bgc-slateTheme12,c-slateTheme1]">Closed <span class="fs-12px o-0.7">95</span></a>
</nav>

Pagination

Previous and next with page numbers, the current page highlighted and a gap for skipped pages.

<nav aria-label="Pagination" class="d-flex aic g-4px __a[d-inline-grid,place-items-center,mw-34px,h-34px,px-8px,br-8px,fs-14px,c-slateTheme11,td-none,font-variant-numeric(tabular-nums)] __a--hover[bgc-slateTheme3,c-slateTheme12] __a[aria-current=page][bgc-accentRA1000,c-white,fw-500]">
  <a href="#" aria-label="Previous page"><svg class="w-16px h-16px flex-shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m15 18-6-6 6-6"/></svg></a>
  <a href="#">1</a>
  <a href="#" aria-current="page">2</a>
  <a href="#">3</a>
  <span class="px-4px c-slateTheme9">…</span>
  <a href="#">12</a>
  <a href="#" aria-label="Next page"><svg class="w-16px h-16px flex-shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6"/></svg></a>
</nav>

Stepper

Progress through a multi-step flow: done, current and upcoming steps, joined by a line.

<ol class="w-100% xw-560px d-flex m-0 p-0 list-style-none">
  <li class="flex-1 d-grid justify-items-center g-8px position-relative --after[cont,position-absolute,t-14px,l(calc(50%_+_20px)),w(calc(100%_-_40px)),h-2px,bgc-accentRA1000]">
    <span class="d-grid place-items-center box-sizing-border-box w-28px h-28px br-999px bgc-accentRA1000 c-white"><svg class="w-14px h-14px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg></span>
    <span class="fs-13px fw-500 c-slateTheme12">Account</span>
  </li>
  <li aria-current="step" class="flex-1 d-grid justify-items-center g-8px position-relative --after[cont,position-absolute,t-14px,l(calc(50%_+_20px)),w(calc(100%_-_40px)),h-2px,bgc-slateTheme5]">
    <span class="d-grid place-items-center box-sizing-border-box w-28px h-28px br-999px b-2px-solid-accentRA1000 bgc-slateTheme1 c-accentRATheme1100 fs-13px fw-600">2</span>
    <span class="fs-13px fw-500 c-slateTheme12">Workspace</span>
  </li>
  <li class="flex-1 d-grid justify-items-center g-8px">
    <span class="d-grid place-items-center box-sizing-border-box w-28px h-28px br-999px b-2px-solid-slateTheme6 bgc-slateTheme1 c-slateTheme10 fs-13px fw-600">3</span>
    <span class="fs-13px c-slateTheme10">Invite team</span>
  </li>
</ol>
NextOverlays