Skip to content

pantoken / renderers/web-components/src / truncate

متغير: truncate

const truncate: ElementDefinition

ألفا

<instui-truncate> — يقيد النص المُدرَج إلى عدد ثابت من الأسطر مع الحذف (ellipsis). lines يقبل عددًا صحيحًا موجبًا أو auto. يعيّن الرقم الخاصية المخصصة --lines مباشرةً. auto تحسب عدد الأسطر من ارتفاع المُضيف المتاح وتطبّق ذلك كـ --lines. اترك lines لاقتطاع سطر واحد.

مثال

html
<instui-truncate lines="2">A long description that will be clamped to two lines…</instui-truncate>