هل تعلم؟dyk.si

قائمة الزر Dropdown Menu (Menu Button)

زر عليه سهم صغير، عند النقر عليه تنسدل منه قائمة عمليات.

يُعرف أيضاً باسم: Menu Button

<button aria-haspopup="menu" aria-expanded>

متى تستخدمه

لمجموعة عمليات مترابطة: التصدير كـ PDF أو Excel.

خطأ شائع

إذا كانت القيمة ستُحفظ كاختيار، فاستخدم Select.

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

Arrow keys move through items, Esc closes and returns focus to the button.

اسمه في الكود

HTML/CSS<button aria-haspopup="menu" aria-expanded>
React<DropdownMenu>
Jetpack ComposeDropdownMenu
SwiftUIMenu

برومبت جاهز لوكيل البرمجة

Add a Dropdown Menu (Menu Button) to this screen. What it is: A button with a small arrow that drops down a list of actions. Implement with: <button aria-haspopup="menu" aria-expanded> (HTML/CSS). Accessibility: Arrow keys move through items, Esc closes and returns focus to the button. When to use it: For a set of related actions: export as PDF or Excel. Avoid: If it stores a chosen value, use a select instead. Reuse the project's existing design tokens, spacing and component conventions.

أو ركّب صفحة كاملة من هذا العنصر وغيره →

البرومبت بالإنجليزية لأنها الأدق مع Claude Code وأمثاله.