Source

Baajii

Iwe ati awọn apẹẹrẹ fun awọn baaji, kika kekere wa ati paati isamisi.

Apeere

Iwọn Baajii lati baamu iwọn ti ano obi lẹsẹkẹsẹ nipa lilo iwọn fonti ojulumo ati emawọn sipo.

Apeere akọle Tuntun
Apeere akọle Tuntun
Apeere akọle Tuntun
Apeere akọle Tuntun
Apeere akọle Tuntun
Apeere akọle Tuntun
<h1>Example heading <span class="badge badge-secondary">New</span></h1>
<h2>Example heading <span class="badge badge-secondary">New</span></h2>
<h3>Example heading <span class="badge badge-secondary">New</span></h3>
<h4>Example heading <span class="badge badge-secondary">New</span></h4>
<h5>Example heading <span class="badge badge-secondary">New</span></h5>
<h6>Example heading <span class="badge badge-secondary">New</span></h6>

Baajii le ṣee lo bi ara awọn ọna asopọ tabi awọn bọtini lati pese counter kan.

<button type="button" class="btn btn-primary">
  Notifications <span class="badge badge-light">4</span>
</button>

Ṣe akiyesi pe da lori bii wọn ṣe nlo wọn, awọn baagi le jẹ airoju fun awọn olumulo ti awọn oluka iboju ati iru awọn imọ-ẹrọ iranlọwọ. Lakoko ti iselona ti awọn baaji n pese ojulowo oju si idi wọn, awọn olumulo wọnyi yoo rọrun ni afihan pẹlu akoonu ti baaji naa. Ti o da lori ipo kan pato, awọn baaji wọnyi le dabi awọn ọrọ afikun tabi awọn nọmba laileto ni ipari gbolohun kan, ọna asopọ, tabi bọtini.

Ayafi ti ọrọ-ọrọ ba han gbangba (gẹgẹbi pẹlu apẹẹrẹ “Awọn iwifunni”, nibiti o ti loye pe “4” jẹ nọmba awọn iwifunni), ronu pẹlu ipo afikun pẹlu nkan ti o farapamọ oju ti ọrọ afikun.

<button type="button" class="btn btn-primary">
  Profile <span class="badge badge-light">9</span>
  <span class="sr-only">unread messages</span>
</button>

Awọn iyatọ ọrọ-ọrọ

Ṣafikun eyikeyi awọn kilasi iyipada ti a mẹnuba ni isalẹ lati yi irisi baaji kan pada.

Alakoko Atẹle Aseyori Ijamba Ikilo Alaye Imọlẹ Dudu
<span class="badge badge-primary">Primary</span>
<span class="badge badge-secondary">Secondary</span>
<span class="badge badge-success">Success</span>
<span class="badge badge-danger">Danger</span>
<span class="badge badge-warning">Warning</span>
<span class="badge badge-info">Info</span>
<span class="badge badge-light">Light</span>
<span class="badge badge-dark">Dark</span>
Gbigbe itumo si awọn imọ-ẹrọ iranlọwọ

Lilo awọ lati ṣafikun itumọ nikan n pese itọkasi wiwo, eyiti kii yoo gbe lọ si awọn olumulo ti awọn imọ-ẹrọ iranlọwọ - gẹgẹbi awọn oluka iboju. Rii daju pe alaye ti o tọka si nipasẹ awọ jẹ eyiti o han gbangba lati inu akoonu funrararẹ (fun apẹẹrẹ ọrọ ti o han), tabi pẹlu pẹlu awọn ọna omiiran, gẹgẹbi afikun ọrọ ti o farapamọ pẹlu .sr-onlykilasi naa.

Awọn aami oogun

Lo .badge-pillkilasi modifier lati ṣe awọn baaji ni iyipo diẹ sii (pẹlu border-radiuspetele ti o tobi ati afikun padding). Wulo ti o ba padanu awọn baaji lati v3.

Alakoko Atẹle Aseyori Ijamba Ikilo Alaye Imọlẹ Dudu
<span class="badge badge-pill badge-primary">Primary</span>
<span class="badge badge-pill badge-secondary">Secondary</span>
<span class="badge badge-pill badge-success">Success</span>
<span class="badge badge-pill badge-danger">Danger</span>
<span class="badge badge-pill badge-warning">Warning</span>
<span class="badge badge-pill badge-info">Info</span>
<span class="badge badge-pill badge-light">Light</span>
<span class="badge badge-pill badge-dark">Dark</span>

Lilo awọn .badge-*kilasi ọrọ-ọrọ lori ohun <a>kan ni kiakia pese awọn baagi iṣẹ ṣiṣe pẹlu awọn ipinlẹ iṣojukọ.

<a href="#" class="badge badge-primary">Primary</a>
<a href="#" class="badge badge-secondary">Secondary</a>
<a href="#" class="badge badge-success">Success</a>
<a href="#" class="badge badge-danger">Danger</a>
<a href="#" class="badge badge-warning">Warning</a>
<a href="#" class="badge badge-info">Info</a>
<a href="#" class="badge badge-light">Light</a>
<a href="#" class="badge badge-dark">Dark</a>