Customization

Using data attributes with CSS

CSS will throw the value of a data attribute into a property with the `attr()` function. See below for a example using Tailwind:

<div data-name="New User Alert" class="before:content-[attr(data-name)]"></div>

This approach to inserting HTML content with CSS is widely available for the `content` property. Useful for avoiding inline styles and maintaining clean code.