قائمة منزلقة

SlideoutMenu

لوح تنقّل منزلق في React برأس وعناصر مجمّعة وروابط الصفحة الحالية وتذييل، بدلالات nav وقوائم حقيقية. ينعكس الجانب في الاتجاه العربي.

SlideoutMenu لوحة تنقل برأس وعناصر مجمعة وتذييل. بخلاف Drawer يستخدم دلالات قوائم وروابط حقيقية، وتنعكس side مع الاتجاه.

متى تستخدمه

استخدم SlideoutMenu للتنقّل على مستوى التطبيق في الجوال أو في ترويسة مضغوطة: أقسام البوّابة، وروابط الحساب، وإجراءات اللغة وتسجيل الخروج. جمّع العناصر وأبقِ المستوى الأعلى قصيرًا.

للتدفّقات الثانوية ذات النماذج، استخدم Drawer. للتنقّل الدائم في سطح المكتب، استخدم Sidebar.

أمثلة

تنقّل مجمّع

روابط الصفحة الحالية

سطح أبيض

الخصائص

الخصائص التي يعرّفها SlideoutMenu. سمات العنصر الأصلي تمرّ كما هي.

<SlideoutMenu>

الخاصيةالنوعالافتراضيالوصف
childrenReactNode
openboolean
defaultOpenboolean
onOpenChange(open: boolean) => void
modalboolean

<SlideoutMenuTrigger>

الخاصيةالنوعالافتراضيالوصف
asChildboolean

<SlideoutMenuClose>

الخاصيةالنوعالافتراضيالوصف
asChildboolean

<SlideoutMenuContent>

الخاصيةالنوعالافتراضيالوصف
side"start" | "end"
background"white" | "gray"
forceMounttrueUsed to force mounting when more control is needed. Useful when controlling animation with React animation libraries.
onOpenAutoFocus(event: Event) => voidEvent handler called when auto-focusing on open. Can be prevented.
onCloseAutoFocus(event: Event) => voidEvent handler called when auto-focusing on close. Can be prevented.
deferPointerDownOutsidebooleanWhen true, a 'pointerdown' event outside of the layered element will wait for the interaction's click event before dispatching, allowing third-party code to stop propagation of later events and cancel dismissal.
onEscapeKeyDown(event: KeyboardEvent) => voidEvent handler called when the escape key is down. Can be prevented.
onPointerDownOutside(event: PointerDownOutsideEvent) => voidEvent handler called when the a pointerdown event happens outside of the DismissableLayer. Can be prevented.
onFocusOutside(event: FocusOutsideEvent) => voidEvent handler called when the focus moves outside of the DismissableLayer. Can be prevented.
onInteractOutside(event: PointerDownOutsideEvent | FocusOutsideEvent) => voidEvent handler called when an interaction happens outside the DismissableLayer. Specifically, when a pointerdown event happens outside or focus moves outside of it. Can be prevented.
asChildboolean

<SlideoutMenuHeader>

الخاصيةالنوعالافتراضيالوصف
iconreact.ReactNodeOptional featured icon, shown in a 32px brand-tinted disc before the title.
showCloseButtonbooleanRender the close (X) button. Defaults to true.
closeLabelstringLocalized aria-label for the close button. Defaults to "Close".

<SlideoutMenuTitle>

الخاصيةالنوعالافتراضيالوصف
asChildboolean

<SlideoutMenuDescription>

الخاصيةالنوعالافتراضيالوصف
asChildboolean

<SlideoutMenuGroup>

الخاصيةالنوعالافتراضيالوصف
labelreact.ReactNodeSection heading rendered above the list (SDGA "Group Label").

<SlideoutMenuItem>

الخاصيةالنوعالافتراضيالوصف
asChildbooleanRender as the child element (e.g. an <a> or router <Link>).
iconreact.ReactNodeLeading 24px icon.
trailingreact.ReactNodeTrailing slot - counter text, an icon button, a check, a Tag, etc.
activebooleanMarks the current page - sets aria-current="page" and the active style.
level1 | 2SDGA Nav Drawer level: 2 indents the row under its parent (40px). Defaults to 1.
expandedbooleanSDGA Nav Drawer "Parent (Sub-menu)": renders a rotating chevron in the trailing slot and sets aria-expanded. Render the level-2 rows after this item while it is expanded.

إمكانية الوصول

يعرض اللوح <nav> بقائمة روابط حقيقية، فيعرضه قارئ الشاشة معلمًا للتنقّل. تُعلّم الصفحة الحالية بـ aria-current="page"، وتستخدم الفواصل role="separator".

لزر الإغلاق والمشغّل أسماء متاحة، ويفتح اللوح من بداية السطر ليطابق اتجاه القراءة.