Logo Logo Logo Logo
هشدارهای اساسی

Alerts are available for any length of text, as well as an optional close button. For proper styling, use one of the eight مورد نیاز contextual classes (e.g.,.هشدار-موفقیت).

<div class="alert alert-primary" role="alert">
    This information is for your reference
</div>
<div class="alert alert-secondary" role="alert">
    Check the details before proceeding.
</div>
<div class="alert alert-success" role="alert">
    Your action was successful.
</div>
<div class="alert alert-danger" role="alert">
    There was an error with your action.
</div>
<div class="alert alert-warning" role="alert">
    There might be an issue you need to check.
</div>
<div class="alert alert-info" role="alert">
    Here is some information for you.
</div>
<div class="alert alert-light" role="alert">
    Try out the latest tool added to your dashboard.
</div>
<div class="alert alert-dark mb-0" role="alert">
    Updates are available in your profile settings.
</div>
هشدارهای کلی

ایجادهشدارهای کلیبا بوت‌استرپ با استفاده از .alert-outline-*کلاس‌ها. جایگزین کنید*با تنوع رنگی مانند اولیه، موفقیت، یاخطربرای سبک‌های مختلف طرح کلی.

<div class="alert alert-outline-primary" role="alert">
    This information is for your reference
</div>
<div class="alert alert-outline-secondary" role="alert">
    Check the details before proceeding.
</div>
<div class="alert alert-outline-success" role="alert">
    Everything is set up and ready to go.
</div>
<div class="alert alert-outline-danger" role="alert">
    We couldn’t process your request. Please try again later.
</div>
<div class="alert alert-outline-warning" role="alert">
    This action will permanently delete the item.
</div>
<div class="alert alert-outline-info" role="alert">
    Scheduled maintenance will occur at midnight.
</div>
<div class="alert alert-outline-light" role="alert">
    You can enable notifications in your profile.
</div>
<div class="alert alert-outline-dark mb-0" role="alert">
    Try out the latest tool added to your dashboard.
</div>
هشدارهای نامحسوس

ایجادهشدارهای کلیبا بوت‌استرپ با استفاده از .alert-subtle-*کلاس‌ها. جایگزین کنید*با تنوع رنگی مانند اولیه، موفقیت، یاخطربرای سبک‌های مختلف طرح کلی.

<div class="alert alert-subtle-primary" role="alert">
    A simple primary alert—check it out!
</div>
<div class="alert alert-subtle-secondary" role="alert">
    A simple secondary alert—check it out!
</div>
<div class="alert alert-subtle-success" role="alert">
    A simple success alert—check it out!
</div>
<div class="alert alert-subtle-danger" role="alert">
    A simple danger alert—check it out!
</div>
<div class="alert alert-subtle-warning" role="alert">
    A simple warning alert—check it out!
</div>
<div class="alert alert-subtle-info" role="alert">
    A simple info alert—check it out!
</div>
<div class="alert alert-subtle-light" role="alert">
    A simple light alert—check it out!
</div>
<div class="alert alert-subtle-dark" role="alert">
    A simple dark alert—check it out!
</div>
هشدارهای حاشیه چپ

اضافه کردنمرز چپبرای هشدارها در بوت‌استرپ با استفاده از .alert-border-*کلاس. این کلاس یک حاشیه با رنگ اصلی به سمت چپ کادر هشدار اعمال می‌کند.

<div class="alert alert-border-primary" role="alert">
    A simple primary alert—check it out!
</div>
<div class="alert alert-border-secondary" role="alert">
    A simple secondary alert—check it out!
</div>
<div class="alert alert-border-success" role="alert">
    A simple success alert—check it out!
</div>
<div class="alert alert-border-danger" role="alert">
    A simple danger alert—check it out!
</div>
<div class="alert alert-border-warning" role="alert">
    A simple warning alert—check it out!
</div>
<div class="alert alert-border-info" role="alert">
    A simple info alert—check it out!
</div>
<div class="alert alert-border-light" role="alert">
    A simple light alert—check it out!
</div>
<div class="alert alert-border-dark" role="alert">
    A simple dark alert—check it out!
</div>
هشدارهای جامد

نمایشهشدارهای پیش‌فرضدر بوت‌استرپ با استفاده از هشدارکلاس. کلاس‌های زمینه‌ای مانند زیر را اضافه کنید.هشدار-اولیه، .هشدار-موفقیت، یا.هشدار-خطربرای سبک‌های هشدار مختلف.

<div class="alert alert-solid-primary" role="alert">
    A simple primary alert—check it out!
</div>
<div class="alert alert-solid-secondary" role="alert">
    A simple secondary alert—check it out!
</div>
<div class="alert alert-solid-success" role="alert">
    A simple success alert—check it out!
</div>
<div class="alert alert-solid-danger" role="alert">
    A simple danger alert—check it out!
</div>
<div class="alert alert-solid-warning" role="alert">
    A simple warning alert—check it out!
</div>
<div class="alert alert-solid-info" role="alert">
    A simple info alert—check it out!
</div>
<div class="alert alert-solid-light" role="alert">
    A simple light alert—check it out!
</div>
<div class="alert alert-solid-dark mb-0" role="alert">
    A simple dark alert—check it out!
</div>
هشدارهای لینک

استفاده از.هشدار-لینککلاس کاربردی برای ارائه سریع لینک‌های رنگی منطبق در هر هشدار.

محتوای اضافی

هشدارها همچنین می‌توانند شامل عناصر HTML اضافی مانند عنوان‌ها، پاراگراف‌ها و جداکننده‌ها باشند.

<div class="alert alert-success mb-0" role="alert">
    <h4 class="alert-heading">Well done!</h4>
    <p>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.</p>
    <hr>
    <p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
</div>

<div class="alert alert-outline-danger mb-0" role="alert">
    <h4 class="alert-heading">Well done!</h4>
    <p>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.</p>
    <hr>
    <p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
</div>

<div class="alert alert-subtle-warning mb-0" role="alert">
    <h4 class="alert-heading">Well done!</h4>
    <p>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.</p>
    <hr class="border-warning border-opacity-30 border-top">
    <p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
</div>

<div class="alert alert-solid-primary mb-0" role="alert">
    <h4 class="alert-heading">Well done!</h4>
    <p>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.</p>
    <hr class="border-light border-opacity-20 border-top">
    <p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
</div>
هشدارهای آیکون‌ها

به طور مشابه، می‌توانید از ابزارهای flexbox و Bootstrap Icons برای ایجاد هشدارها با آیکون استفاده کنید. بسته به آیکون‌ها و محتوای خود، ممکن است بخواهید ابزارهای بیشتر یا سبک‌های سفارشی اضافه کنید.

<div class="alert alert-info d-flex align-items-center mb-0" role="alert">
    <i class="bi bi-info-circle-fill flex-shrink-0 me-2"></i>
    <div>
        An example alert with an icon
    </div>
</div>
<div class="alert alert-outline-success d-flex align-items-center mb-0" role="alert">
    <i class="bi bi-check-circle-fill flex-shrink-0 me-2"></i>
    <div>
        An example success alert with an icon
    </div>
</div>
<div class="alert alert-border-warning d-flex align-items-center mb-0" role="alert">
    <i class="bi bi-exclamation-triangle-fill flex-shrink-0 me-2"></i>
    <div>
        An example warning alert with an icon
    </div>
</div>
<div class="alert alert-subtle-danger d-flex align-items-center mb-0" role="alert">
    <i class="bi bi-exclamation-triangle-fill flex-shrink-0 me-2"></i>
    <div>
        An example danger alert with an icon
    </div>
</div>
رد کردن هشدارها

با استفاده از افزونه هشدار جاوا اسکریپت، می‌توان هرگونه هشدار درون‌خطی را رد کرد.

<div class="alert alert-success alert-dismissible fade show mb-0" role="alert">
    <strong>You’re All Set!</strong> The changes were saved without any issues.
    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<div class="alert alert-outline-danger alert-dismissible fade show mb-0" role="alert">
    <strong>Critical Error!</strong> Something went wrong. Contact support if this continues.
    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<div class="alert alert-border-warning alert-dismissible fade show mb-0" role="alert">
    <strong>Password Expiring!</strong> Update your password to keep your account secure.
    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<div class="alert alert-solid-info alert-dismissible fade show mb-0" role="alert">
    <strong>Upcoming Changes:</strong> Some features may be unavailable during the update.
    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
سفارشی‌سازی قالب

it's time to style according to your choice ..!

طرح بندی

طرح‌بندی خود را انتخاب کنید

عمودی
افقی
نیمه جعبه
عرض محتوا:
پیش‌فرض
جعبه
جهت چیدمان:
راست‌چین
چپ
حالت چیدمان:
نور
تیره
سیستم
اندازه نوار کناری:
پیش‌فرض
آیکون
رنگ نوار کناری:
نور
تیره