in English

Badge ahorow

Nwoma ne nhwɛsoɔ ma badge, yɛn akontabuo ketewa ne labeling component.

Nhwɛsoɔ

Badge ahorow no susuw ho ma ɛne ɔwofo element a ɛwɔ hɔ ntɛm ara no kɛse hyia denam font kɛse ne emunit ahorow a ɛfa ho a wɔde di dwuma no so.

Nhwɛso asɛmtiFoforɔ

Nhwɛso asɛmtiFoforɔ

Nhwɛso asɛmtiFoforɔ

Nhwɛso asɛmtiFoforɔ

Nhwɛso asɛmtiFoforɔ
Nhwɛso asɛmtiFoforɔ
<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>

Wobetumi de badge ahorow adi dwuma sɛ link anaa button ahorow no fã de ama counter.

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

Hyɛ no nsow sɛ, egyina sɛnea wɔde di dwuma so no, ebia badge ahorow no bɛma wɔn a wɔde screen reader ne mfiridwuma a ɛte saa a ɛboa wɔn di dwuma no adwene atu afra. Bere a sɛnea wɔyɛ badge ahorow no ma wotumi hu nea enti a wɔde di dwuma no, nea wɔde badge no mu nsɛm bɛkyerɛ wɔn a wɔde di dwuma yi ara kwa. Ɛgyina tebea pɔtee no so no, saa badge ahorow yi betumi ayɛ te sɛ nsɛmfua anaa nɔma afoforo a wɔde ka ho a wɔanhyɛ da wɔ kasamu, link, anaa bɔtn bi awiei.

Gye sɛ nsɛm a ɛfa ho no mu da hɔ (te sɛ nea ɛte wɔ “Nsɛm a Wɔka Kyerɛ” nhwɛso no ho no, baabi a wɔte ase sɛ “4” no yɛ amanneɛbɔ dodow no), susuw ho sɛ wode nsɛm foforo a ɛfa ho a wɔde nsɛm foforo a wɔde asie wɔ aniwa so bɛka ho.

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

Nsonsonoe a ɛwɔ nsɛm a ɛfa ho mu

Fa modifier class ahorow a yɛaka ho asɛm wɔ ase ha no mu biara ka ho na sesa badge bi hwɛbea.

Mfiaseɛ Nea ɛto so abien Nkunimdie Ɔhaw a ɛbɛtumi aba Kɔkɔbɔ Info Kanea Sum
<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>
Ntease a wɔde bɛma mfiridwuma ahorow a ɛboa

Kɔla a wɔde di dwuma de ntease ka ho no ma wonya sɛnkyerɛnne a wotumi hu nkutoo, a wɔremfa nkɔma wɔn a wɔde mfiridwuma a ɛboa di dwuma – te sɛ screen akenkanfo. Hwɛ sɛ nsɛm a wɔde kɔla no kyerɛ no da adi pefee fi emu nsɛm no ankasa mu (sɛ nhwɛso no, nsɛm a wotumi hu no), anaasɛ wɔde bɛka ho denam akwan foforo so, te sɛ nsɛm foforo a wɔde asie ne .sr-onlyadesuakuw no mu.

Pill badge ahorow

Fa .badge-pillmodifier class no di dwuma ma badge ahorow no yɛ kurukuruwa kɛse (a ɛwɔ border-radiushorizontal kɛse ne nea ɛka ho padding). Mfaso wɔ so sɛ wopa badge ahorow a efi v3 no a.

Mfiaseɛ Nea ɛto so abien Nkunimdie Ɔhaw a ɛbɛtumi aba Kɔkɔbɔ Info Kanea Sum
<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>

Sɛ wode nsɛm a ɛfa ho no .badge-*adesua ahorow di dwuma wɔ <a>element bi so a, ɛma badge ahorow a wotumi de yɛ ade a ɛwɔ hover ne focus tebea horow ma ntɛmntɛm.

<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>