هل تعلم؟dyk.si

زر التحميل Loading Button

زر يتحوّل إلى دائرة دوّارة بعد النقر عليه، كي لا تنقره مرتين.

<button aria-busy="true" disabled>

متى تستخدمه

لأي عملية تستغرق بضع ثوانٍ: الدفع، أو الإرسال.

خطأ شائع

لا تدع عرض الزر يتغيّر أثناء التحميل.

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

Keep the label for screen readers (Saving…) and keep the button width fixed.

اسمه في الكود

HTML/CSS<button aria-busy="true" disabled>
React<Button loading>
Jetpack ComposeButton(enabled=false) { CircularProgressIndicator }
SwiftUIButton { ProgressView() }

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

Add a Loading Button to this screen. What it is: A button that shows a spinner after you press it, so it can’t be pressed twice. Implement with: <button aria-busy="true" disabled> (HTML/CSS). Accessibility: Keep the label for screen readers (Saving…) and keep the button width fixed. When to use it: For any action that takes seconds: payment, submit. Avoid: Don’t let the button change width while loading. Reuse the project's existing design tokens, spacing and component conventions.

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

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