Fa'ase'e ile anotusi autu Fa'ase'e ile su'ega fa'amatalaga
Check
in English

Faailoga

Fa'amaumauga ma fa'ata'ita'iga mo pine, o la tatou vaega la'ititi ma fa'ailoga.

I luga o lenei itulau

Faataitaiga

Fua o pine e fetaui ma le tele o le elemene matua vave e ala i le faʻaogaina o le fua faʻatatau ma emiunite. E pei o le v5, ua le toe iai ni sitaili taula'i po'o sitaili fa'afefe mo so'otaga.

Ulutala

Faataitaiga ulutalaFou

Faataitaiga ulutalaFou

Faataitaiga ulutalaFou

Faataitaiga ulutalaFou

Faataitaiga ulutalaFou
Faataitaiga ulutalaFou
html
<h1>Example heading <span class="badge bg-secondary">New</span></h1>
<h2>Example heading <span class="badge bg-secondary">New</span></h2>
<h3>Example heading <span class="badge bg-secondary">New</span></h3>
<h4>Example heading <span class="badge bg-secondary">New</span></h4>
<h5>Example heading <span class="badge bg-secondary">New</span></h5>
<h6>Example heading <span class="badge bg-secondary">New</span></h6>

Fa'amau

E mafai ona fa'aoga pine e fai ma vaega o so'oga po'o fa'amau e maua ai se fata.

html
<button type="button" class="btn btn-primary">
  Notifications <span class="badge text-bg-secondary">4</span>
</button>

Manatua e fa'atatau ile fa'aogaina, fa'ailoga e ono fenumiai mo tagata fa'aoga lau faitau mata ma isi tekonolosi fesoasoani tutusa. E ui o le fa'avasegaina o pine e maua ai se fa'aaliga vaaia e uiga i lo latou fa'amoemoe, o nei tagata fa'aoga o le a na'o le tu'uina atu i totonu o le pine. Fa'alagolago i le tulaga patino, o nei pine e ono foliga mai o ni upu fa'aopoopo fa'afuase'i po'o numera i le fa'ai'uga o se fuaiupu, so'oga, po'o se faamau.

Se'i vagana ua manino le talaaga (pei o le "Fa'asilasilaga" fa'ata'ita'iga, lea e malamalama ai o le "4" o le numera o fa'amatalaga), mafaufau e aofia ai fa'amatalaga fa'aopoopo ma se vaega o lo'o natia va'aia o tusitusiga fa'aopoopo.

Tulaga

Fa'aoga mea aoga e sui ai .badgema fa'atulaga i le tulimanu o se so'oga po'o se faamau.

html
<button type="button" class="btn btn-primary position-relative">
  Inbox
  <span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">
    99+
    <span class="visually-hidden">unread messages</span>
  </span>
</button>

E mafai foi ona e suia le .badgevasega i ni nai mea aoga e aunoa ma se faitau mo se faailo sili atu.

html
<button type="button" class="btn btn-primary position-relative">
  Profile
  <span class="position-absolute top-0 start-100 translate-middle p-2 bg-danger border border-light rounded-circle">
    <span class="visually-hidden">New alerts</span>
  </span>
</button>

Lanu i tua

Fa'aopoopo i le v5.2.0

Seti se background-colorfa'atusatusaga i luma colorma o tatou .text-bg-{color}fesoasoani . I le taimi muamua sa manaʻomia le faʻapipiʻiina ma le lima o lau filifiliga .text-{color}ma .bg-{color}mea aoga mo le faʻavasegaina, lea e mafai lava ona e faʻaogaina pe a e manaʻo ai.

Peraimeri Lua Manuia Mata'utia Lapataiga Fa'amatalaga Malamalama Pogisa
html
<span class="badge text-bg-primary">Primary</span>
<span class="badge text-bg-secondary">Secondary</span>
<span class="badge text-bg-success">Success</span>
<span class="badge text-bg-danger">Danger</span>
<span class="badge text-bg-warning">Warning</span>
<span class="badge text-bg-info">Info</span>
<span class="badge text-bg-light">Light</span>
<span class="badge text-bg-dark">Dark</span>
Tu'uina atu le uiga i tekinolosi fesoasoani

O le fa'aogaina o le lanu e fa'aopoopo ai le uiga e na'o se fa'aaliga va'aia, e le fa'ailoa atu i tagata fa'aoga o tekonolosi fesoasoani - e pei o le au faitau mata. Ia fa'amautinoa o fa'amatalaga o lo'o fa'ailogaina i le lanu e manino mai le anotusi lava ia (fa'ata'ita'iga o tusitusiga va'aia), pe fa'aofi mai i isi auala, e pei o tusitusiga fa'aopoopo natia i le .visually-hiddenvasega.

pine pili

Fa'aoga le .rounded-pillvasega fa'aoga e fai ai pine sili atu ona lapotopoto ma se lapopoa border-radius.

Peraimeri Lua Manuia Mata'utia Lapataiga Fa'amatalaga Malamalama Pogisa
html
<span class="badge rounded-pill text-bg-primary">Primary</span>
<span class="badge rounded-pill text-bg-secondary">Secondary</span>
<span class="badge rounded-pill text-bg-success">Success</span>
<span class="badge rounded-pill text-bg-danger">Danger</span>
<span class="badge rounded-pill text-bg-warning">Warning</span>
<span class="badge rounded-pill text-bg-info">Info</span>
<span class="badge rounded-pill text-bg-light">Light</span>
<span class="badge rounded-pill text-bg-dark">Dark</span>

CSS

Fuafuaga

Fa'aopoopo i le v5.2.0

I le avea ai o se vaega o le faʻaogaina o suiga CSS a Bootstrap, ua faʻaogaina nei e pine faʻaoga CSS faʻapitonuʻu i luga .badgemo le faʻaleleia o le taimi moni aganuʻu. O tau mo le CSS fesuiaiga e faʻatulagaina e ala i le Sass, o lea o loʻo lagolagoina pea le Sass customization.

  --#{$prefix}badge-padding-x: #{$badge-padding-x};
  --#{$prefix}badge-padding-y: #{$badge-padding-y};
  @include rfs($badge-font-size, --#{$prefix}badge-font-size);
  --#{$prefix}badge-font-weight: #{$badge-font-weight};
  --#{$prefix}badge-color: #{$badge-color};
  --#{$prefix}badge-border-radius: #{$badge-border-radius};
  

Sass fesuiaiga

$badge-font-size:                   .75em;
$badge-font-weight:                 $font-weight-bold;
$badge-color:                       $white;
$badge-padding-y:                   .35em;
$badge-padding-x:                   .65em;
$badge-border-radius:               $border-radius;