هل تعلم؟dyk.si

عدّاد الزيادة والنقصان Stepper (Number Input)

زرّا الناقص والزائد حول رقم، تزيد بهما الكمية أو تنقصها خطوة خطوة.

يُعرف أيضاً باسم: Number Input

<input type="number">

متى تستخدمه

لكميات صغيرة: عدد القطع في السلة، عدد الضيوف.

خطأ شائع

لأرقام كبيرة مثل ١٥٠٠، دع المستخدم يكتبها.

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

Label the buttons ("Decrease quantity") and announce the new value.

اسمه في الكود

HTML/CSS<input type="number">
React<NumberInput> (custom)
Jetpack ComposeCustom Row (no built-in)
SwiftUIStepper

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

Add a Stepper (Number Input) to this screen. What it is: Minus and plus buttons around a number that change it one step at a time. Implement with: <input type="number"> (HTML/CSS). Accessibility: Label the buttons ("Decrease quantity") and announce the new value. When to use it: For small quantities: items in a cart, number of guests. Avoid: For large numbers like 1500, let people type. Reuse the project's existing design tokens, spacing and component conventions.

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

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