From the course: Bootstrap 5 Essential Training
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Alerts - Bootstrap Tutorial
From the course: Bootstrap 5 Essential Training
Alerts
- Alerts give you some quick styles for an element. The sign to give the user messages. It's pretty simple. Let's take a look at how it works. You have an alert class and then you can specify a contextual color class. So you can say alert primary, secondary and all the traditional colors. And then there are some options that you can use. For example, you can have an alert-heading, an alert-link and that just makes the link color match the color of the background. And then you have an option to dismiss the alert if you want to. And also some options for animating, or showing, or hiding the alerts. And then there is in Bootstrap, a special component. I really don't have it anywhere by itself because it doesn't make sense for it to be by itself. But it's a component called btn-close and you'll see it used in many components that need a close button. And this happens to be, I think maybe the first one or at least one of them. So let's check this out. And I have these different versions…