Helpers
Miscellaneous utilities for visibility, accessibility, interaction, and content display.
Visibility
Class
Property
Value
visiblevisibilityvisibleinvisiblevisibilityhiddenUnlike
d-none,invisiblehides the element but keeps its space in the document flow.
Accessibility
Class
Effect
sr-onlyVisually hidden but readable by screen readers (absolute position, 1px clipped size)
Pointer events
Class
pointer-events
pointer-events-nonenonepointer-events-autoautoUser select
Class
user-select
select-nonenoneselect-texttextselect-allallselect-autoautoObject fit
Class
object-fit
object-containcontainobject-covercoverobject-fillfillobject-nonenoneAspect ratio
Class
aspect-ratio
aspect-square1 / 1aspect-video16 / 9aspect-autoautoLine clamp
Class
Effect
line-clamp-1Clamp to 1 line with
…line-clamp-2Clamp to 2 lines
line-clamp-3Clamp to 3 lines
line-clamp-4Clamp to 4 lines
line-clamp-5Clamp to 5 lines
Examples
html
<!-- Screen-reader only label -->
<button>
<span aria-hidden="true">X</span>
<span class="sr-only">Close dialog</span>
</button>
<!-- Non-clickable decorative overlay -->
<div class="pointer-events-none absolute inset-0">
Decorative layer
</div>
<!-- Responsive video thumbnail -->
<div class="aspect-video overflow-hidden radius-8">
<img class="w-100 h-100 object-cover" src="thumbnail.jpg" />
</div>
<!-- Square icon box -->
<div class="aspect-square d-flex items-center justify-center bg-blue radius-4" style="width: 48px">
<i class="icon text-white"></i>
</div>
<!-- Truncated description -->
<p class="line-clamp-2">
A very long product description that will be clamped after the second line...
</p>
<!-- Prevent text selection -->
<div class="select-none">This text cannot be selected</div>