blob: 28211cd5d64191cabfa635a6c1e4c2989292ac86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
---
layout: docs
title: Close button
description: A generic close button for dismissing content like modals and alerts.
group: components
---
**Be sure to include text for screen readers**, as we've done with `aria-label`. Disabled close buttons have `pointer-events: none` applied to, preventing hover and active states from triggering.
{{< example >}}
<button type="button" class="close" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<button type="button" class="close" disabled aria-label="Close">
<span aria-hidden="true">×</span>
</button>
{{< /example >}}
|