dropdown
شاشة القائمة شاشة قائمة عامة فيها عنوان وشريط أدوات وصفوف، تعمل على سطح المكتب وعلى الهاتف.
عنصر يُفتح ويُغلق بلا أي JavaScript: زر summary فوق لوحة من روابط عادية. ضعه في صف بجانب ما يعمل عليه، ولا تضعه أبدًا في سطر وحده.
كل مثال يعمل فعلًا، لكن روابطه لا تؤدي إلى أي مكان. يعرض HTML الترميز الجاهز للنسخ.
قائمة تصفية بخيار واحد مطبَّق
<div rst-box-head >
<h2 >المنشورات</h2 >
<details rst-dropdown name ="rst-menus" >
<summary rst-btn aria-label ="ترتيب المنشورات: الأحدث أولًا" >
الأحدث
<svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><path d ="m6 9 6 6 6-6" /></svg >
</summary >
<div rst-dropdown-menu >
<a href ="/posts?sort=newest" aria-current ="true" >الأحدث <svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><path d ="M20 6 9 17l-5-5" /></svg ></a >
<a href ="/posts?sort=oldest" >الأقدم</a >
<a href ="/posts?sort=title" >حسب العنوان</a >
</div >
</details >
</div >
في تطبيق حقيقي سيصل هذا إلى /posts?sort=newest, /posts?sort=oldest, /posts?sort=title. أما هنا فروابطه ونماذجه لا تذهب إلى أي مكان.
قائمة details/summary التي تقف خلف قوائم الفائض في الترويسة وخلف تصفية شريط القائمة، ومعها تصفية مطبَّقة في هيئة شارة يمكن إزالتها.
<div rst-list >
<div rst-lbar >
<details rst-dropdown name ="rst-menus" >
<summary >
تصفية
<span rst-caret aria-hidden ="true" >
<svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><path d ="m6 9 6 6 6-6" /></svg >
</span >
<span class ="rst-sr-only" >تصفية الطلبات: مدفوع</span >
</summary >
<div rst-dropdown-menu >
<a aria-current ="true" href ="/orders?status=paid" >مدفوع</a >
<details rst-menu-group name ="rst-menus-price" open >
<summary >السعر</summary >
<div >
<a href ="/orders?price=free" >مجاني</a >
</div >
</details >
</div >
</details >
<span rst-ftok >
<span rst-ftok-k >مدفوع</span >
<a href ="/orders" aria-label ="إزالة عامل التصفية مدفوع" >✕</a >
</span >
</div >
</div >
في تطبيق حقيقي سيصل هذا إلى /orders, /orders?price=free, /orders?status=paid. أما هنا فروابطه ونماذجه لا تذهب إلى أي مكان.