@thenewcss/alerts
v1.0.0
Published
Alert components for the-new-css
Downloads
7
Maintainers
Readme
@thenewcss/alerts
Alert components for the-new-css utility-first CSS library.
What's included
- Base
.alertwith padding, border, and border-radius - Color variants:
.alert-info,.alert-success,.alert-warning,.alert-danger .btn-closereusable close button with X icon.alert-dismissiblefor dismissible alerts with positioned close button
Install
npm install @thenewcss/alertsUsage
Include the CSS after the-new-css base library:
<link rel="stylesheet" href="path/to/the-new-css.min.css" />
<link rel="stylesheet" href="path/to/@thenewcss/alerts/dist/index.min.css" />Basic Alerts
<div class="alert alert-info">This is an info alert.</div>
<div class="alert alert-success">This is a success alert.</div>
<div class="alert alert-warning">This is a warning alert.</div>
<div class="alert alert-danger">This is a danger alert.</div>Dismissible Alert
<div class="alert alert-warning alert-dismissible">
<strong>Warning!</strong> Something needs your attention.
<button class="btn-close" aria-label="Close"></button>
</div>License
MIT
