@@ -12,19 +12,19 @@ import ListGroupDisabled from '../../examples/ListGroup/Disabled';
12
12
import ListGroupStyle from ' ../../examples/ListGroup/Style' ;
13
13
import ListGroupStyleActions from ' ../../examples/ListGroup/StyleActions' ;
14
14
import ListGroupFlush from ' ../../examples/ListGroup/Flush' ;
15
+ import ListGroupNumbered from ' ../../examples/ListGroup/Numbered' ;
16
+ import ListGroupNumberedCustom from ' ../../examples/ListGroup/NumberedCustom' ;
15
17
import ListGroupHorizontal from ' ../../examples/ListGroup/Horizontal' ;
16
18
import ListGroupHorizontalResponsive from ' ../../examples/ListGroup/HorizontalResponsive' ;
17
19
import ListGroupTabs from ' ../../examples/ListGroup/Tabs' ;
18
20
19
21
import styles from ' ../../css/examples.module.scss' ;
20
22
21
-
22
23
# List groups
23
24
24
25
<p className = " lead" >
25
- List groups are a flexible and powerful component for displaying a
26
- series of content. Modify and extend them to support just about any
27
- content within.
26
+ List groups are a flexible and powerful component for displaying a series of
27
+ content. Modify and extend them to support just about any content within.
28
28
</p >
29
29
30
30
## Basic Example
@@ -54,7 +54,6 @@ that call `preventDefault` to mimick disabled behavior.
54
54
exampleClassName = { styles .listGroup }
55
55
/>
56
56
57
-
58
57
### Actionable items
59
58
60
59
Toggle the ` action ` prop to create <em >actionable</em > list group
@@ -80,6 +79,24 @@ edge-to-edge in a parent container [such as a `Card`](/components/cards/#list-gr
80
79
exampleClassName = { styles .listGroup }
81
80
/>
82
81
82
+ ### Numbered
83
+
84
+ Add the ` numbered ` prop to opt into numbered list group items. Numbers are generated via CSS
85
+ (as opposed to a ` <ol> ` s default browser styling) for better placement inside list group items
86
+ and to allow for better customization.
87
+
88
+ <ReactPlayground
89
+ codeText = { ListGroupNumbered }
90
+ exampleClassName = { styles .listGroup }
91
+ />
92
+
93
+ These work great with custom content as well.
94
+
95
+ <ReactPlayground
96
+ codeText = { ListGroupNumberedCustom }
97
+ exampleClassName = { styles .listGroup }
98
+ />
99
+
83
100
### Horizontal
84
101
85
102
Use the ` horizontal ` prop to make the ListGroup render horizontally. Currently ** horizontal list groups cannot be combined with flush list groups.**
@@ -113,11 +130,12 @@ When paired with `action`s, additional hover and active styles apply.
113
130
/>
114
131
115
132
<Callout title = " Conveying meaning to assistive technologies" >
116
- Using color to add meaning only provides a visual indication,
117
- which will not be conveyed to users of assistive technologies – such as screen readers.
118
- Ensure that information denoted by the color is either obvious from the content itself
119
- (e.g. the visible text), or is included through alternative means,
120
- such as additional text hidden with the <code >.visually-hidden</code > class.
133
+ Using color to add meaning only provides a visual indication, which will not
134
+ be conveyed to users of assistive technologies – such as screen readers.
135
+ Ensure that information denoted by the color is either obvious from the
136
+ content itself (e.g. the visible text), or is included through alternative
137
+ means, such as additional text hidden with the <code >.visually-hidden</code >{ ' ' }
138
+ class.
121
139
</Callout >
122
140
123
141
## Tabbed Interfaces
@@ -126,17 +144,15 @@ You can also use the [Tab][tabs] components to create ARIA compliant tabbable
126
144
interfaces with the ` <ListGroup> ` component. Swap out the ` <Nav> ` component
127
145
for the list group and you are good to go.
128
146
129
- <ReactPlayground
130
- codeText = { ListGroupTabs }
131
- exampleClassName = { styles .listGroup }
132
- />
147
+ <ReactPlayground codeText = { ListGroupTabs } exampleClassName = { styles .listGroup } />
133
148
134
149
## API
135
150
136
151
<ComponentApi metadata = { props .data .ListGroup } />
137
- <ComponentApi metadata = { props .data .ListGroupItem } exportedBy = { props .data .ListGroup } />
138
-
139
-
152
+ <ComponentApi
153
+ metadata = { props .data .ListGroupItem }
154
+ exportedBy = { props .data .ListGroup }
155
+ />
140
156
141
157
export const query = graphql `
142
158
query ListGroupQuery {
0 commit comments