Daenerys of the House Targaryen, the First of Her Name, The Unburnt, Queen of the Andals, the Rhoynar and the First Men, Queen of Meereen, Khaleesi of the Great Grass Sea, Protector of the Realm, Lady Regent of the Seven Kingdoms, Breaker of Chains and Mother of Dragons
Use white-space: nowrap to expand to the right
Jorah Mormont of House Mormont, Lord of Bear Island
DRAFT Davis, Julia
Loading...
<div class="island">
<tui-line-clamp
[content]="daenerys"
[lineHeight]="20"
[linesLimit]="2"
/>
</div>
<div
tuiNotification
class="tui-space_bottom-4"
>
Use
<code>white-space: nowrap</code>
to expand to the right
</div>
<div class="island">
<tui-line-clamp
[content]="mormont"
[lineHeight]="20"
[linesLimit]="1"
/>
</div>
<ng-template #daenerys>
<div class="hint">
Daenerys of the House Targaryen, the First of Her Name, The Unburnt, Queen of the Andals, the Rhoynar and the
First Men, Queen of Meereen, Khaleesi of the Great Grass Sea, Protector of the Realm, Lady Regent of the Seven
Kingdoms, Breaker of Chains and Mother of Dragons
</div>
</ng-template>
<ng-template #mormont>
<div class="hint no-wrap">Jorah Mormont of House Mormont, Lord of Bear Island</div>
</ng-template>
<div class="island">
<tui-line-clamp [content]="content" />
<ng-template #content>
<span
appearance="negative"
size="xxs"
tuiChip
>
DRAFT
</span>
Davis, Julia
</ng-template>
</div>
<div class="tui-space_bottom-4">
<tui-line-clamp
[content]="value()"
[linesLimit]="2"
/>
@if (!value()) {
<button
size="s"
tuiButton
type="button"
(click)="update()"
>
Load dynamic value
</button>
}
</div>
@if (value$ | async; as value) {
<div class="wrapper">
<div class="result">
<div class="content">
<tui-line-clamp
[content]="value"
[lineHeight]="20"
[linesLimit]="1"
/>
</div>
</div>
</div>
} @else {
Loading...
}
Daenerys of the House Targaryen, the First of Her Name, The Unburnt, Queen of the Andals, the Rhoynar and the First Men, Queen of Meereen, Khaleesi of the Great Grass Sea, Protector of the Realm, Lady Regent of the Seven Kingdoms, Breaker of Chains and Mother of Dragons
<div class="island">
<tui-line-clamp
content="Daenerys of the House Targaryen, the First of Her Name, The Unburnt, Queen of the Andals, the Rhoynar and the First Men, Queen of Meereen, Khaleesi of the Great Grass Sea, Protector of the Realm, Lady Regent of the Seven Kingdoms, Breaker of Chains and Mother of Dragons"
class="clamp"
[linesLimit]="linesLimit"
/>
<button
tuiButton
type="button"
class="tui-space_top-4"
(click)="toggle()"
>
Toggle
</button>
</div>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
<div class="example">
<div
#parent
class="line-clamp-box"
(waResizeObserver)="onResize(parent)"
>
<tui-line-clamp
[content]="content"
[lineHeight]="lineHeight || getDynamicLineHeight(parent)"
[linesLimit]="lineLimit || getDynamicLineLimit(parent)"
/>
<ng-template #content>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and
scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into
electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of
Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like
Aldus PageMaker including versions of Lorem Ipsum.
</ng-template>
</div>
</div>
Daenerys of the House Targaryen, the First of Her Name, The Unburnt, Queen of the Andals, the Rhoynar and the First Men, Queen of Meereen, Khaleesi
<button
tuiButton
type="button"
class="tui-space_bottom-4"
(click)="toggle()"
>
Toggle is overflown: {{ hasOverflownContent() }}
</button>
<tui-line-clamp
[content]="content"
[lineHeight]="33"
[linesLimit]="linesLimit"
(overflownChange)="hasOverflownContent.set($event)"
/>
<ng-template #content>
<div
[style.font-size.px]="24"
[style.line-height.px]="33"
>
Daenerys of the House Targaryen, the First of Her Name, The Unburnt, Queen of the Andals, the Rhoynar and the
First Men, Queen of Meereen, Khaleesi
</div>
</ng-template>