v6.0.0-beta.5
  • Home
  • Tokens
  • Layout
  • Utilities
    • Click Area
    • Container
    • Counted
    • Dimensions
    • Hover Group
    • Indexed
    • Margin
    • No Print
    • Typography
    • Visually Hidden
    • Z-Index
  • Guides
  • home
  • /
  • utilities
  • /
  • Click Area
Source

Click Area

The Click Area utility makes an entire container clickable by expanding the clickable area of a child anchor element. This is particularly useful for card layouts, list items, or any container where you want the entire area to be interactive, not just the text link itself.

Usage

Apply the .click-area class to a container that contains an anchor element. The utility creates an invisible overlay that covers the entire parent container, making the whole area clickable while maintaining proper semantic HTML structure.

<div class="click-area">
  <h3>Card Title</h3>
  <p>Some description text here...</p>
  <a href="/read-more">Read more</a>
</div>

Note: This utility is not compatible with table rows as the ::after pseudo-element is not supported on table rows in Safari and Chrome browsers.

← layout: Tiles utilities: Container →
© Crinkles.
Powered by: 11ty & Feo.css | Github