هل تعلم؟dyk.si

قص النص Truncation (Ellipsis)

إذا كان النص أطول من المساحة، يُقطع وتُوضع في آخره ثلاث نقاط «…».

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

text-overflow: ellipsis / line-clamp

متى تستخدمه

في الجداول والقوائم عندما تكون المساحة ضيقة.

خطأ شائع

لا تقتطع أسعاراً أو أرقاماً أو أسماء مهمة.

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

Keep the full text reachable through a tooltip or an expand link.

اسمه في الكود

HTML/CSStext-overflow: ellipsis / line-clamp
ReactclassName="truncate"
Jetpack Composeoverflow = TextOverflow.Ellipsis
SwiftUI.lineLimit(1).truncationMode(.tail)

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

Add a Truncation (Ellipsis) to this screen. What it is: When text is longer than its space, it gets cut and ends with "…". Implement with: text-overflow: ellipsis / line-clamp (HTML/CSS). Accessibility: Keep the full text reachable through a tooltip or an expand link. When to use it: In tables and lists where space is tight. Avoid: Don’t truncate prices, numbers, or key names. Reuse the project's existing design tokens, spacing and component conventions.

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

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