هل تعلم؟dyk.si

الشارة Badge

دائرة حمراء صغيرة في زاوية الأيقونة، تحمل عدد الإشعارات أو نقطة تعني «هناك جديد».

aria-label="3 unread"

متى تستخدمه

لعدد العناصر غير المقروءة أو حالة «جديد».

خطأ شائع

لا تضعها على كل شيء، فتفقد معناها.

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

Put the count in the accessible name; a red dot alone says nothing.

اسمه في الكود

HTML/CSSaria-label="3 unread"
React<Badge>
Jetpack ComposeBadgedBox + Badge
SwiftUI.badge(3)

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

Add a Badge to this screen. What it is: A small dot or count on the corner of an icon showing unread items. Implement with: aria-label="3 unread" (HTML/CSS). Accessibility: Put the count in the accessible name; a red dot alone says nothing. When to use it: For unread counts or a "new" status. Avoid: Don’t put one on everything; it stops meaning anything. Reuse the project's existing design tokens, spacing and component conventions.

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

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

يُخلَط بينه وبين عناصر أخرى؟

⇄ Badge أم Status Badge أم Status Dot؟