Mask

A mask hides distractions to focus attention on particular content.
Example
Theme
Auto
Auto
Light
Dark
Scale
Medium
Large
Medium
Small
A placeholder image
<div class="ts-image">
    <img src="image.png" style="max-width: 450px">
    <div class="ts-mask is-centered">
        <div class="ts-loading is-large" style="color: #FFF"></div>
    </div>
</div>
Variations
Partially

A mask can cover only part of its content's height, not the entire area.

A placeholder image
Top Mask
And here's the description.
A placeholder image
Middle Mask
And here's the description.
A placeholder image
Bottom Mask
And here's the description.
<div class="ts-image">
    <img src="image.png" style="max-width: 450px">
    <div class="ts-mask is-top">
        <div class="ts-content" style="color: #FFF">
            <div class="ts-header">Top Mask</div>
            And here's the description.
        </div>
    </div>
</div>
<div class="ts-image">
    <img src="image.png" style="max-width: 450px">
    <div class="ts-mask is-middle">
        <div class="ts-content" style="color: #FFF">
            <div class="ts-header">Middle Mask</div>
            And here's the description.
        </div>
    </div>
</div>
<div class="ts-image">
    <img src="image.png" style="max-width: 450px">
    <div class="ts-mask is-bottom">
        <div class="ts-content" style="color: #FFF">
            <div class="ts-header">Bottom Mask</div>
            And here's the description.
        </div>
    </div>
</div>
Centered

A mask can center its content, typically used with Loading.

A placeholder image
<div class="ts-image">
    <img src="image.png" style="max-width: 450px">
    <div class="ts-mask is-centered">
        <div class="ts-loading is-large" style="color: #FFF"></div>
    </div>
</div>
Faded

A mask background can be faded and placed at the top or bottom of its container.

A placeholder image
Top Mask
And here's the description.
A placeholder image
Bottom Mask
And here's the description.
<div class="ts-image">
    <img src="image.png" style="max-width: 450px">
    <div class="ts-mask is-faded is-top">
        <div class="ts-content" style="color: #FFF">
            <div class="ts-header">Top Mask</div>
            And here's the description.
        </div>
    </div>
</div>
<div class="ts-image">
    <img src="image.png" style="max-width: 450px">
    <div class="ts-mask is-faded is-bottom">
        <div class="ts-content" style="color: #FFF">
            <div class="ts-header">Bottom Mask</div>
            And here's the description.
        </div>
    </div>
</div>
Secondary

A secondary mask has a transparent background.

A placeholder image
On-Sale
Buy this cake for just NT$3,000!
<div class="ts-image">
    <img src="image.png" style="max-width: 450px">
    <div class="ts-mask is-secondary is-bottom">
        <div class="ts-content" style="color: #333">
            <div class="ts-header">On-Sale</div>
            Buy this cake for just NT$3,000!
        </div>
    </div>
</div>
Blurring

A mask with a blurred background.

A placeholder image
<div class="ts-image">
    <img src="image.png" style="max-width: 450px">
    <div class="ts-mask is-blurring"></div>
</div>
Compositions

A close button on the top-right corner of an image.

A placeholder image
<div class="ts-image is-rounded">
    <img src="image.png" width="150">
    <div class="ts-mask is-secondary is-top">
        <div class="ts-content is-compact is-end-aligned has-leading-none">
            <button class="ts-close"></button>
        </div>
    </div>
</div>
Metadata

A metadata at the bottom of an image.

A placeholder image
32 KB
<div class="ts-image is-rounded">
    <img src="image.png" width="150">
    <div class="ts-mask is-secondary is-bottom">
        <div class="ts-content is-compact is-end-aligned">
            <div class="ts-badge">32 KB</div>
        </div>
    </div>
</div>
Designed by Yami Odymel from Taiwan, along with the ❤️ from contributors. The source code is licensed under MIT, and the documentation is under CC 0 public domain. Feel free to use, share, or contribute. Tocas UI is a design system for Caris Events, part of Sorae & Co., Ltd.
Translators: Yami Odymel
Trademark of the owner of Tocas UI