Enhanced Bootstrap Masking

Built in Masking PRO

Create a mask effect animation on any element, image or text

Overview

This effect hides an element by clipping it using CSS clip-path and reveals it when trigger is performed. The element itself stays in the original place, only
the mask is animated. When the element is masked, the clipping box has a 0% height or width and the element is entirely hidden without any possible user interaction such as hover or focus.

Example

Example of gradual masking effect on heading title. Made with mask--right and delay[{value}].

Hover me

Masking effect made super easy with Torus Kit

CSS mask effect example
<div data-fx-trigger="hover">
  <h2>
    <span class="d-block"><span data-fx="hover/T:mask--right exponential">Masking effect</span></span>
    <span class="d-block"><span data-fx="hover/T:mask--right exponential delay[100ms]">made super easy</span></span>
    <span class="d-block"><span data-fx="hover/T:mask--right exponential delay[200ms]">with Torus Kit</span></span>
  </h2>
</div>

Triggers

To animate the mask when {trigger} is performed on a single element, use data-fx="{trigger}:mask--{direction} where {trigger} is:

  • inview: - when element appears in the viewport and gets .inview class
  • active: - when element gets .active class
  • show: - when element gets .show class

And the {direction} one of the:

  • up mask reveals upwards from bottom to top
  • down mask reveals downwards from top to bottom
  • left mask reveals from the right to the left
  • right mask reveals from the left to the right
Because the clip-path hides entire element, it doesn’t respond to user hover interaction. This is why hover: (hover) trigger is not available.
Mask up
Mask right
Mask down
Mask left
          













<div data-fx="active:mask--up">Mask up</div>
<div data-fx="active:mask--right">Mask right</div>
<div data-fx="active:mask--down">Mask down</div>
<div data-fx="active:mask--left">Mask left</div>
          

Scroll into view to toggle .inview class

Mask up
Mask right
Mask down
Mask left
          













<div data-fx="inview:mask--up">Mask up</div>
<div data-fx="inview:mask--right">Mask right</div>
<div data-fx="inview:mask--down">Mask down</div>
<div data-fx="inview:mask--left">Mask left</div>
          

Parent trigger

To animate the mask of a single or multiple child elements when {trigger} is performed on a parent element,
add data-fx-trigger="{inview|active|show|hover} to indicate that this is a parent element with the desired trigger - if this parent trigger is performed,
child elements will change.

Than add data-fx="{TRIGGER}:mask--{direction} attribute to child elements where {TRIGGER} is:

  • inview/T: - when .inview class is applied on parent Trigger element, because it’s visible in the viewport
  • active/T: - when .active class is applied on parent Trigger element
  • show/T: - when .show class is applied on parent Trigger element
  • hover/T: - when hover state is applied on parent Trigger element

And the {direction} one of the:

  • up mask reveals upwards from bottom to top
  • down mask reveals downwards from top to bottom
  • left mask reveals from the right to the left
  • right mask reveals from the left to the right

Hover over the wrapper:

Mask up
Mask right
Mask down
Mask left
          













<div data-fx-trigger="hover">
  <div data-fx="hover/T:mask--up">Mask up</div>
  <div data-fx="hover/T:mask--right">Mask right</div>
  <div data-fx="hover/T:mask--down">Mask down</div>
  <div data-fx="hover/T:mask--left">Mask left</div>
</div>
      
          

Click the wrapper to toggle .active class:

Mask up
Mask right
Mask down
Mask left
          













<div data-fx-trigger="active">
  <div data-fx="active/T:mask--up">Mask up</div>
  <div data-fx="active/T:mask--right">Mask right</div>
  <div data-fx="active/T:mask--down">Mask down</div>
  <div data-fx="active/T:mask--left">Mask left</div>
</div>
      
          

Scroll into view to toggle .inview class on parent

Mask up
Mask right
Mask down
Mask left
          













<div data-fx-trigger="inview">
  <div data-fx="inview/T:mask--up">Mask up</div>
  <div data-fx="inview/T:mask--right">Mask right</div>
  <div data-fx="inview/T:mask--down">Mask down</div>
  <div data-fx="inview/T:mask--left">Mask left</div>
</div>