Position Component
Fixed / absolute centering, corner anchoring, and sticky offsets using logical properties.
Notes
- Corner anchors default to
0 offsets; combine with Tailwind spacing (e.g. top-4) to adjust.
- Absolute positioning requires
position: relative on the parent.
- Sticky utilities require a scrollable container.
- All classes use logical properties, so RTL is supported automatically.
Interactive fixed / absolute
Switch the target between fixed and absolute to see how it anchors to the viewport vs. the parent box.
Target
Cover
absolute-cover — fills the parent
absolute-cover-4 — cover with dynamic gap
The same fixed-cover / fixed-cover-x / fixed-cover-y variants fill the viewport instead of the parent.
Centering
The same fixed-* variants anchor to the viewport instead of the parent.
Corner anchors
top-start
top-end
bottom-start
bottom-end
Fixed variants (fixed-top-start fixed-top-end fixed-bottom-start fixed-bottom-end) behave the same but stick to the viewport.
Sticky
sticky-top
Header
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
sticky-bottom
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
Footer
sticky-top-4 (offset)
Top-4
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10