هل تعلم؟dyk.si

الزر العائم Floating Action Button (FAB)

زر دائري كبير يطفو في زاوية الشاشة لأهم إجراء فيها، مثل الإضافة أو الكتابة.

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

<button> + position: fixed

متى تستخدمه

لإجراء واحد أساسي: رسالة جديدة، إضافة عنصر.

خطأ شائع

لا تضع أكثر من واحد، ولا تدعه يغطّي محتوى مهماً.

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

Keep it to one per screen and give it an accessible label.

اسمه في الكود

HTML/CSS<button> + position: fixed
React<Fab> — MUI
Jetpack ComposeFloatingActionButton / ExtendedFloatingActionButton
SwiftUICustom .overlay button

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

Add a Floating Action Button (FAB) to this screen. What it is: A round button floating in the corner for the screen’s primary action, like add or compose. Implement with: <button> + position: fixed (HTML/CSS). Accessibility: Keep it to one per screen and give it an accessible label. When to use it: For one primary action: new message, add item. Avoid: Never more than one, and don’t let it cover important content. Reuse the project's existing design tokens, spacing and component conventions.

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

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

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

⇄ Button Variants أم Icon Button أم FAB؟