File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed
website/src/content/pages/utilities Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 14
14
}
15
15
},
16
16
{
17
- "files": "*.md",
17
+ "files": [ "*.md", "*.mdx"] ,
18
18
"options": {
19
19
"printWidth": 100,
20
20
"proseWrap": "always"
Original file line number Diff line number Diff line change
1
+ ---
2
+ id : focus-trap
3
+ title : Focus Trap
4
+ description : Trap focus within a specified container.
5
+ status : new
6
+ ---
7
+
8
+ ## Motivation
9
+
10
+ Focus trapping is essential for modal interfaces and other interactive elements that require user
11
+ attention.
12
+
13
+ The ` FocusTrap ` component helps maintain accessibility by ensuring keyboard focus remains within a
14
+ designated container until explicitly released.
15
+
16
+ ## Examples
17
+
18
+ <Example id = " basic" />
19
+
20
+ ### Autofocus
21
+
22
+ The focus trap respects elements with the ` autofocus ` attribute.
23
+
24
+ <Example id = " autofocus" />
25
+
26
+ ### Initial Focus
27
+
28
+ Use the ` initialFocus ` prop to set the element that should receive initial focus when the trap is
29
+ activated.
30
+
31
+ <Example id = " initial-focus" />
32
+
33
+ ## API Reference
34
+
35
+ <ComponentTypes id = " focus-trap" />
You can’t perform that action at this time.
0 commit comments