Helpers
Fixed & sticky
Bars that stay in view: a top bar, a bottom tab bar on phones, a table header or a "Save changes" bar that sticks while you scroll.
sticky-top — stays at the top
Row 1
Row 2
Row 3
Row 4
Row 5
Row 6
Row 7
Row 8
2 unsaved changes
<div class="overflow-y-auto bg-surface rounded-lg h-60">
<div class="sticky-top bg-blur px-4 py-3 font-semibold">sticky-top — stays at the top</div>
<div class="stack gap-2 p-4">
<div>Row 1</div>
<div>Row 2</div>
<div>Row 3</div>
<div>Row 4</div>
<div>Row 5</div>
<div>Row 6</div>
<div>Row 7</div>
<div>Row 8</div>
</div>
<div class="sticky-bottom bg-blur px-4 py-3 hstack">
<span class="text-sm text-muted">2 unsaved changes</span>
<div class="spacer"></div>
<button class="btn btn-sm btn-default btn-solid">Save</button>
</div>
</div>
Fixed bars
fixed-top and fixed-bottom stay on screen while the page scrolls under them. A fixed bottom bar keeps clear of the phone's home bar on its own. (Not shown live — it would cover these docs.)
<nav class="fixed-bottom bg-blur border-t md:hidden">
<div class="hstack justify-evenly py-2">…</div>
</nav>
| Class | What it does |
|---|---|
fixed-top · fixed-bottom | pinned to the screen edge (Moey's fixed layer) |
sticky-top · sticky-bottom | sticks once it reaches the edge of its scrolling box (Moey's sticky layer) |
| Other edges | use the position utilities: sticky top-16 · fixed bottom-4 end-4 |