الإكمال التلقائي Combobox (Autocomplete)
حقل كتابة يعرض لك قائمة اقتراحات تُصفّى مع كل حرف تكتبه.
يُعرف أيضاً باسم: Autocomplete
role="combobox" + <datalist>متى تستخدمه
لقوائم طويلة: مدن، دول، منتجات.
خطأ شائع
لـ ٥ خيارات فقط، الـ Select أو الـ Radio أبسط.
إمكانية الوصول
Arrow keys move through suggestions, Enter picks, and the result count is announced.
اسمه في الكود
| HTML/CSS | role="combobox" + <datalist> |
|---|---|
| React | <Command> / <Combobox> |
| Jetpack Compose | ExposedDropdownMenuBox |
| SwiftUI | .searchable + .searchSuggestions |
برومبت جاهز لوكيل البرمجة
Add a Combobox (Autocomplete) to this screen.
What it is: A text field with a list of suggestions that filters as you type.
Implement with: role="combobox" + <datalist> (HTML/CSS).
Accessibility: Arrow keys move through suggestions, Enter picks, and the result count is announced.
When to use it: For long lists: cities, countries, products.
Avoid: For five options, a select or radio group is simpler.
Reuse the project's existing design tokens, spacing and component conventions.
أو ركّب صفحة كاملة من هذا العنصر وغيره →
البرومبت بالإنجليزية لأنها الأدق مع Claude Code وأمثاله.