components
Tailwind CSS Remove element
Easily remove elements with just a single click, streamlining your workflow and enhancing user experience.
Include the data-remove-element
attribute in the close button element and set its value to #id
to specify the element to be removed.
Customize the removal animation by incorporating the removing:
modifier, as illustrated below.
With a single click on the close button, this card will be effortlessly removed.
Below example demonstrates use of remove-element
in badges.
Below example demonstrates use of remove-element
in alerts.
In the data-remove-element-options
attribute, assign an object as its value.
Within this object, define the removeTargetAnimationClass
key as a Tailwind CSS class, which will be applied during the removal process.By default, this value is derived from the modifier class removing:
, but it can also be specified using this data attribute option.
With a single click on the close button, this card will be effortlessly removed.