@@ -14,6 +14,8 @@ A set of interactive sections that show or hide connected information.
14
14
15
15
<Showcase name = " hero" />
16
16
17
+ ## ✨ Features
18
+
17
19
<FeatureList
18
20
features = { [
19
21
' Follows the WAI-Aria design pattern' ,
@@ -123,21 +125,23 @@ The component itself can also be disabled by setting the `disabled` prop to true
123
125
124
126
<Showcase name = " disabled-root" />
125
127
126
- ## Animation
128
+ ## Advanced
129
+
130
+ ### Animation
127
131
128
132
Animations can also be added using the ` --qwikui-collapsible-content-height ` variable.
129
133
130
134
<Showcase name = " animation" />
131
135
132
136
<CodeSnippet name = " animation.css" />
133
137
134
- ## CSR
138
+ ### CSR
135
139
136
140
The Accordion automatically renders based on its environment. This means that it works for both server-side and client-side rendering.
137
141
138
142
<Showcase name = " csr" />
139
143
140
- ## Dynamic
144
+ ### Dynamic
141
145
142
146
You have custom control over how to render items in the Accordion, allowing for dynamic rendering of items.
143
147
@@ -148,3 +152,98 @@ You have custom control over how to render items in the Accordion, allowing for
148
152
## Example CSS
149
153
150
154
<CodeSnippet name = " accordion.css" />
155
+
156
+ ## Keyboard Interaction
157
+
158
+ <KeyboardInteractionTable
159
+ keyDescriptors = { [
160
+ {
161
+ keyTitle: ' Space' ,
162
+ description: ` Expands the content of the focused section. ` ,
163
+ },
164
+ {
165
+ keyTitle: ' Enter' ,
166
+ description: ` Expands the content of the focused section. ` ,
167
+ },
168
+ {
169
+ keyTitle: ' Tab' ,
170
+ description: ` Moves focus to the next element. ` ,
171
+ },
172
+ {
173
+ keyTitle: ' Shift + Tab' ,
174
+ description: ` Moves focus to the previous element. ` ,
175
+ },
176
+ {
177
+ keyTitle: ' ArrowDown' ,
178
+ description: ` Moves focus to the next trigger. ` ,
179
+ },
180
+ {
181
+ keyTitle: ' ArrowUp' ,
182
+ description: ` Moves focus to the previous trigger. ` ,
183
+ },
184
+ {
185
+ keyTitle: ' Home' ,
186
+ description: ` Moves focus to the first trigger. ` ,
187
+ },
188
+ {
189
+ keyTitle: ' End' ,
190
+ description: ` Moves focus to the last trigger. ` ,
191
+ },
192
+ ]}
193
+ />
194
+
195
+ ## API
196
+
197
+ ### Accordion.Root
198
+
199
+ <APITable
200
+ propDescriptors = { [
201
+ {
202
+ name: ' multiple' ,
203
+ type: ' boolean' ,
204
+ description: ' Allows multiple items to be expanded.' ,
205
+ },
206
+ {
207
+ name: ' bind:value' ,
208
+ type: ' Signal' ,
209
+ description: ' Reactive signal that controls the selected item.' ,
210
+ },
211
+ {
212
+ name: ' initialIndex' ,
213
+ type: ' number' ,
214
+ description: ' Index of the initially expanded item.' ,
215
+ },
216
+ {
217
+ name: ' onChange$' ,
218
+ type: ' function' ,
219
+ description: ' Called when the state changes.' ,
220
+ },
221
+ {
222
+ name: ' disabled' ,
223
+ type: ' boolean' ,
224
+ description: ' Disables the entire accordion.' ,
225
+ },
226
+ {
227
+ name: ' collapsible' ,
228
+ type: ' boolean' ,
229
+ description: ' Allows items to be collapsible.' ,
230
+ },
231
+ ]}
232
+ />
233
+
234
+ ### Accordion.Item
235
+
236
+ <APITable
237
+ propDescriptors = { [
238
+ {
239
+ name: ' value' ,
240
+ type: ' string' ,
241
+ description: ' The value associated with the accordion item.' ,
242
+ },
243
+ {
244
+ name: ' disabled' ,
245
+ type: ' boolean' ,
246
+ description: ' When true, the accordion item is disabled.' ,
247
+ },
248
+ ]}
249
+ />
0 commit comments