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
<strong>Bottom:</strong> Mobile action sheets, quick actions, mobile-optimized panels
226
-
</p>
227
-
228
-
<aid="best-practices">
229
-
<h2>Best Practices</h2>
230
-
</a>
231
-
<br/>
232
-
<h3>Content Organization</h3>
233
-
<ul>
234
-
<li>Keep drawer content focused on a single purpose</li>
235
-
<li>Prioritize frequently used items at the top</li>
236
-
<li>Group related items with visual separators</li>
237
-
<li>Limit nesting to 2-3 levels maximum</li>
238
-
</ul>
239
-
240
-
<h3>Accessibility</h3>
241
-
<ul>
242
-
<li>Ensure keyboard navigation works (Tab, Escape keys)</li>
243
-
<li>Trap focus within the drawer when open</li>
244
-
<li>Provide clear ARIA labels for screen readers</li>
245
-
<li>Return focus to trigger element when closing</li>
246
-
</ul>
247
-
248
-
<h3>Responsive Behavior</h3>
249
-
<ul>
250
-
<li>Use temporary drawers on mobile (< 960px)</li>
251
-
<li>Consider persistent or permanent on desktop (> 960px)</li>
252
-
<li>Adjust drawer width based on screen size</li>
253
-
<li>Test on actual devices, not just browser resize</li>
254
-
</ul>
255
-
256
-
<h3>User Experience</h3>
257
-
<ul>
258
-
<li>Make drawer triggers easily discoverable</li>
259
-
<li>Provide smooth open/close animations</li>
260
-
<li>Include a visible close button or clear dismiss method</li>
261
-
<li>Maintain consistent behavior across your application</li>
262
-
</ul>
263
-
</SistentThemeProvider>
66
+
<aid="Usage">
67
+
<h2>Usage</h2>
68
+
</a>
69
+
<p>
70
+
Drawers provide access to destinations and app functionality without navigating away from the current page. They help organize secondary content and actions, making your interface cleaner and more focused.
71
+
</p>
72
+
<ul>
73
+
<li>Use drawers for navigation menus in mobile and responsive applications</li>
74
+
<li>Organize filters and sorting options that need to be accessible but not always visible</li>
75
+
<li>Present settings panels that complement the main interface</li>
76
+
<li>Display contextual information without disrupting the user's workflow</li>
77
+
</ul>
78
+
79
+
<aid="Basic Example">
80
+
<h3>Basic Example</h3>
81
+
</a>
82
+
<p>
83
+
A simple navigation drawer that slides in from the left side of the screen.
Follow these guidelines to ensure drawers are effective and user-friendly:
183
+
</p>
184
+
<ul>
185
+
<li>
186
+
<strong>Clear Purpose:</strong> Use drawers for navigation, filters, or supplementary content. Avoid using them for critical actions or primary content.
187
+
</li>
188
+
<li>
189
+
<strong>Appropriate Width:</strong> Keep drawer width between 240-360px on desktop. On mobile, drawers can be up to 80% of screen width.
190
+
</li>
191
+
<li>
192
+
<strong>Positioning:</strong> Use left anchors for primary navigation, right anchors for settings/filters, and top/bottom for mobile-specific patterns.
193
+
</li>
194
+
<li>
195
+
<strong>Responsive Behavior:</strong> Use temporary drawers on mobile (< 960px) and consider persistent or permanent drawers on desktop (> 960px).
196
+
</li>
197
+
<li>
198
+
<strong>Keyboard Support:</strong> Ensure drawers can be opened/closed with keyboard (Escape key) and focus is managed properly.
199
+
</li>
200
+
<li>
201
+
<strong>Clear Dismissal:</strong> Provide multiple ways to close temporary drawers: backdrop click, close button, or Escape key.
202
+
</li>
203
+
<li>
204
+
<strong>Content Organization:</strong> Keep drawer content focused and well-organized. Use lists, dividers, and headers to structure information.
205
+
</li>
206
+
<li>
207
+
<strong>Performance:</strong> Lazy load drawer content when possible to improve initial page load performance.
208
+
</li>
209
+
<li>
210
+
<strong>Accessibility:</strong> Use proper ARIA labels, manage focus trap within the drawer, and ensure screen reader compatibility.
211
+
</li>
212
+
<li>
213
+
<strong>Animation:</strong> Use smooth slide-in/out transitions. Avoid overly long animations that slow down user interactions.
0 commit comments