You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/src/content/docs/components/list-group.mdx
+3-13Lines changed: 3 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,22 +30,12 @@ Add `.active` to a `.list-group-item` to indicate the current active selection.
30
30
<li class="list-group-item">And a fifth one</li>
31
31
</ul>`} />
32
32
33
-
## Disabled items
34
-
35
-
Add `.disabled` to a `.list-group-item` to make it _appear_ disabled. Note that some elements with `.disabled` will also require custom JavaScript to fully disable their click events (e.g., links).
Use `<a>`s or `<button>`s to create _actionable_ list group items with hover, disabled, and active states by adding `.list-group-item-action`. We separate these pseudo-classes to ensure list groups made of non-interactive elements (like `<li>`s or `<div>`s) don’t provide a click or tap affordance.
48
36
37
+
Make `.list-group-item-action` instances _appear_ disabled by adding `.disabled`, and `aria-disabled="true"` to inform assistive technologies that the element is disabled. You may require additional JavaScript to fully disable links and buttons.
38
+
49
39
Be sure to **not use the standard `.btn` classes here**.
50
40
51
41
<Examplecode={`<div class="list-group">
@@ -55,7 +45,7 @@ Be sure to **not use the standard `.btn` classes here**.
55
45
<a href="#" class="list-group-item list-group-item-action">A second link item</a>
56
46
<a href="#" class="list-group-item list-group-item-action">A third link item</a>
57
47
<a href="#" class="list-group-item list-group-item-action">A fourth link item</a>
58
-
<a class="list-group-item list-group-item-action disabled" aria-disabled="true">A disabled link item</a>
48
+
<a href="#" class="list-group-item list-group-item-action disabled" aria-disabled="true">A disabled link item</a>
59
49
</div>`} />
60
50
61
51
With `<button>`s, you can also make use of the `disabled` attribute instead of the `.disabled` class. Sadly, `<a>`s don’t support the disabled attribute.
0 commit comments