UI ELEMENTS
Although they're a way of displaying text, alerts have their own specificity and functionality.
These examples are using the ink-dismiss
class to add a "close" button. If you are interested in this behaviour, you need to include the Ink.UI.Close Ink component. Don't worry, it's already included with autoload. If you're not using autoload, just add the following code somewhere on your page:
Alerts are useful whenever there is the need to give some sort of visual feedback to a user action or to give your users information.
Class name | Description |
---|---|
ink-alert |
Alerts root class. |
basic block
|
Defines the type of alert. |
info success error
|
Defines alert theme. |
ink-dismiss |
Defines a dismissing action button. |
Basic alerts are useful for simple interaction with the user, such as showing a state on a web application or giving a warning on a form.
Warning: There's a warning for you
Done: Process completed successfully
Note: You have 5 minutes to leave, before self-destruction
Error: The system has failed
Block alerts are ideal for messages that require further explanation, since they're comprised of a title.
Please note that, due to a platypus invasion on our datacenter early last morning, the servers will have to undergo a maintenance cleaning today at 23:00 GMT.
Your payment has been received and your plutonium will be shipped shortly. Check your e-mail for tracking information.
A ring of weapons-grade 99.96% pure electrorefined plutonium is enough for one bomb core.