Alerts
https://getbootstrap.com/docs/4.3/components/alerts/
Attributes
| Attribute | Value(s) | Data type | Default | Description |
|---|---|---|---|---|
| style | primary, secondary, success, danger, warning, info, light, dark | string | primary | Element styling |
| dismiss | true, false | bool | Make alert dismissible | |
| class | custom | string | Add custom class |
Style
[pastacode lang=“php“ manual=“%5Balert%20style%3D%22primary%22%5DA%20simple%20primary%20alert%E2%80%94check%20it%20out!%5B%2Falert%5D%0A%0A%5Balert%20style%3D%22secondary%22%5DA%20simple%20secondary%20alert%E2%80%94check%20it%20out!%5B%2Falert%5D%0A%0A%5Balert%20style%3D%22success%22%5DA%20simple%20success%20alert%E2%80%94check%20it%20out!%5B%2Falert%5D%0A%0A%5Balert%20style%3D%22danger%22%5DA%20simple%20danger%20alert%E2%80%94check%20it%20out!%5B%2Falert%5D%0A%0A%5Balert%20style%3D%22warning%22%5DA%20simple%20warning%20alert%E2%80%94check%20it%20out!%5B%2Falert%5D%0A%0A%5Balert%20style%3D%22info%22%5DA%20simple%20info%20alert%E2%80%94check%20it%20out!%5B%2Falert%5D%0A%0A%5Balert%20style%3D%22light%22%5DA%20simple%20light%20alert%E2%80%94check%20it%20out!%5B%2Falert%5D%0A%0A%5Balert%20style%3D%22dark%22%5DA%20simple%20dark%20alert%E2%80%94check%20it%20out!%5B%2Falert%5D“ message=““ highlight=““ provider=“manual“/]
Link Color
Die Klasse .alert-link wird automatisch per JS gesetzt, sofern der Link nicht die Klasse .btn enthält.
[pastacode lang=“php“ manual=“%5Balert%20style%3D%22primary%22%5DA%20simple%20primary%20alert%20with%20%3Ca%20href%3D%22%23%22%3Ean%20example%20link%3C%2Fa%3E.%20Give%20it%20a%20click%20if%20you%20like.%5B%2Falert%5D%0A%0A%5Balert%20style%3D%22secondary%22%5DA%20simple%20secondary%20alert%20%3Ca%20href%3D%22%23%22%20class%3D%22btn%20btn-secondary%22%3Ewith%20an%20example%20link%3C%2Fa%3E.%20Give%20it%20a%20click%20if%20you%20like.%5B%2Falert%5D“ message=““ highlight=““ provider=“manual“/]
Additional content
Well done!
Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.
Whenever you need to, be sure to use margin utilities to keep things nice and tidy.
[pastacode lang=“php“ manual=“%5Balert%20style%3D%22success%22%5D%3Ch3%3EWell%20done!%3C%2Fh3%3E%0A%0AAww%20yeah%2C%20you%20successfully%20read%20this%20important%20alert%20message.%20This%20example%20text%20is%20going%20to%20run%20a%20bit%20longer%20so%20that%20you%20can%20see%20how%20spacing%20within%20an%20alert%20works%20with%20this%20kind%20of%20content.%0A%0A%3Chr%20%2F%3E%0A%0AWhenever%20you%20need%20to%2C%20be%20sure%20to%20use%20margin%20utilities%20to%20keep%20things%20nice%20and%20tidy.%5B%2Falert%5D“ message=““ highlight=““ provider=“manual“/]
Dismissing
[pastacode lang=“php“ manual=“%5Balert%20style%3D%22warning%22%20dismiss%3D%22true%22%5D%3Cstrong%3EHoly%20guacamole!%3C%2Fstrong%3E%20You%20should%20check%20in%20on%20some%20of%20those%20fields%20below.%5B%2Falert%5D%0A“ message=““ highlight=““ provider=“manual“/]
Class
[pastacode lang=“php“ manual=“%5Balert%20style%3D%22primary%22%20class%3D%22mx-5%22%5DA%20simple%20primary%20alert%20with%20a%20custom%20class!%5B%2Falert%5D“ message=““ highlight=““ provider=“manual“/]