8000 Alerts · enioaiello/atomix Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000
Enio edited this page Dec 3, 2024 · 1 revision

Alerts

Atomix lets you create alerts. Useful for displaying important messages. They can be used, for example, to display a disconnection message.

Create an alert

To create an alert, use the alert class. This gives:

<div class="alert">
I am an alert!
</div>

Add an icon

To add an icon, use this:

<div class="alert">
<i class="ri-information-line icon"></i>
<p class="content">A simple alert with icon</p>
</div>

You can replace the Fontawesome icon with an image. Make sur to add the icon class.

Colors

There are 7 different colors:

  • Primary: no class
  • Success: success
  • Danger: danger
  • Warning : warning
  • Information: info
  • Light: light
  • Dark: dark

Click to close

If you don't want automatic closing. You can use a JavaScript script to close the alert if necessary.

<div class="alert close" onclick="this.style.display = 'none';" title="Click to dismiss">
<img src="../assets/images/logo.png" alt="Icon" class="icon">
<p class="content">A simple alert with icon and close <br>Click to close</p>
</div>

Size

The height of the alert adapts to the height of its contents. If the text is longer than the icon, the icon will be centered vertically, and vice versa. To use line breaks, you can use <br> (although this is bad practice).

Clone this wiki locally
0