Jya ku bintu nyamukuru Jya kuri docs
in English

Andika itsinda

Amatsinda y'urutonde ni ibintu byoroshye kandi bikomeye byo kwerekana urukurikirane rw'ibirimo. Hindura kandi ubagure kugirango bashyigikire hafi y'ibirimo byose imbere.

Urugero rwibanze

Urutonde rwibanze rwitsinda ni urutonde rudafite urutonde rwibintu hamwe nibyiciro bikwiye. Wiyubakire hamwe namahitamo akurikira, cyangwa hamwe na CSS yawe nkuko bikenewe.

  • Ikintu
  • Ikintu cya kabiri
  • Ikintu cya gatatu
  • Ingingo ya kane
  • Uwa gatanu
<ul class="list-group">
  <li class="list-group-item">An item</li>
  <li class="list-group-item">A second item</li>
  <li class="list-group-item">A third item</li>
  <li class="list-group-item">A fourth item</li>
  <li class="list-group-item">And a fifth one</li>
</ul>

Ibintu bifatika

Ongeraho .activea .list-group-itemkugirango werekane ibyatoranijwe bikora.

  • Ikintu gikora
  • Ikintu cya kabiri
  • Ikintu cya gatatu
  • Ingingo ya kane
  • Uwa gatanu
<ul class="list-group">
  <li class="list-group-item active" aria-current="true">An active item</li>
  <li class="list-group-item">A second item</li>
  <li class="list-group-item">A third item</li>
  <li class="list-group-item">A fourth item</li>
  <li class="list-group-item">And a fifth one</li>
</ul>

Ibintu byahagaritswe

Ongeraho .disabledkuri a .list-group-itemkugirango bigaragare ko byahagaritswe. Menya ko ibintu bimwe na bimwe .disabledbizakenera JavaScript yihariye kugirango ihagarike byimazeyo ibyabaye (urugero, amahuza).

  • Ikintu cyahagaritswe
  • Ikintu cya kabiri
  • Ikintu cya gatatu
  • Ingingo ya kane
  • Uwa gatanu
<ul class="list-group">
  <li class="list-group-item disabled" aria-disabled="true">A disabled item</li>
  <li class="list-group-item">A second item</li>
  <li class="list-group-item">A third item</li>
  <li class="list-group-item">A fourth item</li>
  <li class="list-group-item">And a fifth one</li>
</ul>

Koresha <a>s cyangwa <button>s kugirango ukore urutonde rwibikorwa byitsinda ryibintu hamwe na hover, byahagaritswe, hamwe na leta ikora wongeyeho .list-group-item-action. Dutandukanya aya masomo ya pseudo kugirango tumenye amatsinda yakozwe kurutonde rwibintu bidakorana (nka <li>s cyangwa <div>s) bidatanga gukanda cyangwa gukanda.

Witondere kudakoresha .btnamasomo asanzwe hano .

<div class="list-group">
  <a href="#" class="list-group-item list-group-item-action active" aria-current="true">
    The current link item
  </a>
  <a href="#" class="list-group-item list-group-item-action">A second link item</a>
  <a href="#" class="list-group-item list-group-item-action">A third link item</a>
  <a href="#" class="list-group-item list-group-item-action">A fourth link item</a>
  <a class="list-group-item list-group-item-action disabled">A disabled link item</a>
</div>

Hamwe na <button>s, urashobora kandi gukoresha disabledikiranga aho kuba .disabledicyiciro. Birababaje, <a>ntabwo ushyigikiye ikiranga.

<div class="list-group">
  <button type="button" class="list-group-item list-group-item-action active" aria-current="true">
    The current button
  </button>
  <button type="button" class="list-group-item list-group-item-action">A second item</button>
  <button type="button" class="list-group-item list-group-item-action">A third button item</button>
  <button type="button" class="list-group-item list-group-item-action">A fourth button item</button>
  <button type="button" class="list-group-item list-group-item-action" disabled>A disabled button item</button>
</div>

Fasha

Ongeraho .list-group-flushkugirango ukureho imipaka hamwe nu mfuruka zizengurutse kugirango utange urutonde rwibintu byitsinda kugeza ku kintu cyababyeyi (urugero, amakarita).

  • Ikintu
  • Ikintu cya kabiri
  • Ikintu cya gatatu
  • Ingingo ya kane
  • Uwa gatanu
<ul class="list-group list-group-flush">
  <li class="list-group-item">An item</li>
  <li class="list-group-item">A second item</li>
  <li class="list-group-item">A third item</li>
  <li class="list-group-item">A fourth item</li>
  <li class="list-group-item">And a fifth one</li>
</ul>

Numero

Ongeramo .list-group-numberedicyiciro cyo guhindura (kandi uhitemo gukoresha ikintu <ol>) kugirango uhitemo urutonde rwibintu byitsinda. Imibare ikorwa binyuze muri CSS (bitandukanye na <ol>sisitemu isanzwe ya mushakisha) kugirango ishyirwe neza imbere yurutonde rwibintu no kwemerera neza.

Imibare ikorwa na counter-resetkuri <ol>, hanyuma ikandikwa igashyirwa hamwe na ::beforepseudo-element kuri <li>hamwe counter-incrementna content.

  1. Urutonde
  2. Urutonde
  3. Urutonde
<ol class="list-group list-group-numbered">
  <li class="list-group-item">A list item</li>
  <li class="list-group-item">A list item</li>
  <li class="list-group-item">A list item</li>
</ol>

Ibi bikora cyane hamwe nibirimo bisanzwe.

  1. Umutwe
    Ibirimo kurutonde
    14
  2. Umutwe
    Ibirimo kurutonde
    14
  3. Umutwe
    Ibirimo kurutonde
    14
<ol class="list-group list-group-numbered">
  <li class="list-group-item d-flex justify-content-between align-items-start">
    <div class="ms-2 me-auto">
      <div class="fw-bold">Subheading</div>
      Content for list item
    </div>
    <span class="badge bg-primary rounded-pill">14</span>
  </li>
  <li class="list-group-item d-flex justify-content-between align-items-start">
    <div class="ms-2 me-auto">
      <div class="fw-bold">Subheading</div>
      Content for list item
    </div>
    <span class="badge bg-primary rounded-pill">14</span>
  </li>
  <li class="list-group-item d-flex justify-content-between align-items-start">
    <div class="ms-2 me-auto">
      <div class="fw-bold">Subheading</div>
      Content for list item
    </div>
    <span class="badge bg-primary rounded-pill">14</span>
  </li>
</ol>

Uhagaritse

Ongeraho .list-group-horizontalkugirango uhindure imiterere yurutonde rwibintu kuva kuri vertical to horizontal kurwego rwose. Ubundi, hitamo impinduka zishubije .list-group-horizontal-{sm|md|lg|xl|xxl}kugirango ukore urutonde itsinda ritambitse guhera kuri iyo ngingo min-width. Kugeza ubu urutonde rutambitse ntirushobora guhuzwa hamwe na flush urutonde rwamatsinda.

ProTip: Urashaka ubugari buringaniye urutonde rwibintu mugihe utambitse? Ongeraho .flex-fillkuri buri rutonde rw'itsinda.

  • Ikintu
  • Ikintu cya kabiri
  • Ikintu cya gatatu
  • Ikintu
  • Ikintu cya kabiri
  • Ikintu cya gatatu
  • Ikintu
  • Ikintu cya kabiri
  • Ikintu cya gatatu
  • Ikintu
  • Ikintu cya kabiri
  • Ikintu cya gatatu
  • Ikintu
  • Ikintu cya kabiri
  • Ikintu cya gatatu
  • Ikintu
  • Ikintu cya kabiri
  • Ikintu cya gatatu
<ul class="list-group list-group-horizontal">
  <li class="list-group-item">An item</li>
  <li class="list-group-item">A second item</li>
  <li class="list-group-item">A third item</li>
</ul>
<ul class="list-group list-group-horizontal-sm">
  <li class="list-group-item">An item</li>
  <li class="list-group-item">A second item</li>
  <li class="list-group-item">A third item</li>
</ul>
<ul class="list-group list-group-horizontal-md">
  <li class="list-group-item">An item</li>
  <li class="list-group-item">A second item</li>
  <li class="list-group-item">A third item</li>
</ul>
<ul class="list-group list-group-horizontal-lg">
  <li class="list-group-item">An item</li>
  <li class="list-group-item">A second item</li>
  <li class="list-group-item">A third item</li>
</ul>
<ul class="list-group list-group-horizontal-xl">
  <li class="list-group-item">An item</li>
  <li class="list-group-item">A second item</li>
  <li class="list-group-item">A third item</li>
</ul>
<ul class="list-group list-group-horizontal-xxl">
  <li class="list-group-item">An item</li>
  <li class="list-group-item">A second item</li>
  <li class="list-group-item">A third item</li>
</ul>

Amasomo ajyanye

Koresha amasomo ajyanye nuburyo bwo gutondekanya urutonde hamwe na leta hamwe nibara.

  • Urutonde rworoheje urutonde rwitsinda
  • Urutonde rwibanze rwibanze rwitsinda
  • Urutonde rworoheje rwa kabiri urutonde rwitsinda
  • Intsinzi yoroshye kurutonde rwitsinda
  • Urutonde rworoshye urutonde rwibintu
  • Urutonde rworoshye rwo kuburira urutonde rwitsinda
  • Ibisobanuro byoroshye urutonde rwitsinda
  • Urutonde rworoheje urutonde rwibintu
  • Urutonde rworoshye rwurutonde rwitsinda
<ul class="list-group">
  <li class="list-group-item">A simple default list group item</li>

  <li class="list-group-item list-group-item-primary">A simple primary list group item</li>
  <li class="list-group-item list-group-item-secondary">A simple secondary list group item</li>
  <li class="list-group-item list-group-item-success">A simple success list group item</li>
  <li class="list-group-item list-group-item-danger">A simple danger list group item</li>
  <li class="list-group-item list-group-item-warning">A simple warning list group item</li>
  <li class="list-group-item list-group-item-info">A simple info list group item</li>
  <li class="list-group-item list-group-item-light">A simple light list group item</li>
  <li class="list-group-item list-group-item-dark">A simple dark list group item</li>
</ul>

Amasomo ajyanye nayo akorana nayo .list-group-item-action. Reba inyongera yuburyo bwa hover hano ntabwo igaragara murugero rwabanje. Inkunga nayo ni .activeleta; shyira mu bikorwa kugirango ugaragaze ihitamo rikorwa kurutonde rwibintu.

<div class="list-group">
  <a href="#" class="list-group-item list-group-item-action">A simple default list group item</a>

  <a href="#" class="list-group-item list-group-item-action list-group-item-primary">A simple primary list group item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-secondary">A simple secondary list group item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-success">A simple success list group item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-danger">A simple danger list group item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-warning">A simple warning list group item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-info">A simple info list group item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-light">A simple light list group item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-dark">A simple dark list group item</a>
</div>
Gutanga ibisobanuro kubuhanga bufasha

Gukoresha ibara kugirango wongere ibisobanuro bitanga gusa icyerekezo cyerekana, kitazashyikirizwa abakoresha tekinoroji ifasha - nk'abasoma ecran. Menya neza ko amakuru yerekanwe n'ibara agaragara uhereye kubirimo ubwabyo (urugero: inyandiko igaragara), cyangwa bigashyirwa muburyo butandukanye, nk'inyandiko y'inyongera ihishe hamwe .visually-hiddenn'ishuri.

N'ibirango

Ongeraho badge kurutonde urwo arirwo rwose kugirango werekane ibara ridasomwe, ibikorwa, nibindi byinshi bifashishije ibikorwa bimwe na bimwe byingirakamaro .

  • Urutonde14
  • Ikintu cya kabiri cyurutonde2
  • Ikintu cya gatatu cyurutonde1
<ul class="list-group">
  <li class="list-group-item d-flex justify-content-between align-items-center">
    A list item
    <span class="badge bg-primary rounded-pill">14</span>
  </li>
  <li class="list-group-item d-flex justify-content-between align-items-center">
    A second list item
    <span class="badge bg-primary rounded-pill">2</span>
  </li>
  <li class="list-group-item d-flex justify-content-between align-items-center">
    A third list item
    <span class="badge bg-primary rounded-pill">1</span>
  </li>
</ul>

Ibirimo

Ongeramo hafi HTML iyo ari yo yose, ndetse no kumurwi uhuza urutonde nkurwo hepfo, hamwe nubufasha bwa flexbox .

<div class="list-group">
  <a href="#" class="list-group-item list-group-item-action active" aria-current="true">
    <div class="d-flex w-100 justify-content-between">
      <h5 class="mb-1">List group item heading</h5>
      <small>3 days ago</small>
    </div>
    <p class="mb-1">Some placeholder content in a paragraph.</p>
    <small>And some small print.</small>
  </a>
  <a href="#" class="list-group-item list-group-item-action">
    <div class="d-flex w-100 justify-content-between">
      <h5 class="mb-1">List group item heading</h5>
      <small class="text-muted">3 days ago</small>
    </div>
    <p class="mb-1">Some placeholder content in a paragraph.</p>
    <small class="text-muted">And some muted small print.</small>
  </a>
  <a href="#" class="list-group-item list-group-item-action">
    <div class="d-flex w-100 justify-content-between">
      <h5 class="mb-1">List group item heading</h5>
      <small class="text-muted">3 days ago</small>
    </div>
    <p class="mb-1">Some placeholder content in a paragraph.</p>
    <small class="text-muted">And some muted small print.</small>
  </a>
</div>

Agasanduku na radiyo

Shira agasanduku ka Bootstrap hamwe na radiyo murutonde rwibintu hanyuma uhitemo nkuko bikenewe. Urashobora kubikoresha nta <label>s, ariko nyamuneka wibuke gushyiramo aria-labelikiranga nagaciro kubishoboka.

  • Agasanduku ka mbere
  • Agasanduku ka kabiri
  • Agasanduku ka gatatu
  • Agasanduku ka kane
  • Agasanduku ka gatanu
<ul class="list-group">
  <li class="list-group-item">
    <input class="form-check-input me-1" type="checkbox" value="" aria-label="...">
    First checkbox
  </li>
  <li class="list-group-item">
    <input class="form-check-input me-1" type="checkbox" value="" aria-label="...">
    Second checkbox
  </li>
  <li class="list-group-item">
    <input class="form-check-input me-1" type="checkbox" value="" aria-label="...">
    Third checkbox
  </li>
  <li class="list-group-item">
    <input class="form-check-input me-1" type="checkbox" value="" aria-label="...">
    Fourth checkbox
  </li>
  <li class="list-group-item">
    <input class="form-check-input me-1" type="checkbox" value="" aria-label="...">
    Fifth checkbox
  </li>
</ul>

Niba kandi ushaka <label>nka nkibice .list-group-itembinini byibasiwe, urashobora kubikora, nabyo.

<div class="list-group">
  <label class="list-group-item">
    <input class="form-check-input me-1" type="checkbox" value="">
    First checkbox
  </label>
  <label class="list-group-item">
    <input class="form-check-input me-1" type="checkbox" value="">
    Second checkbox
  </label>
  <label class="list-group-item">
    <input class="form-check-input me-1" type="checkbox" value="">
    Third checkbox
  </label>
  <label class="list-group-item">
    <input class="form-check-input me-1" type="checkbox" value="">
    Fourth checkbox
  </label>
  <label class="list-group-item">
    <input class="form-check-input me-1" type="checkbox" value="">
    Fifth checkbox
  </label>
</div>

Sass

Ibihinduka

$list-group-color:                  $gray-900;
$list-group-bg:                     $white;
$list-group-border-color:           rgba($black, .125);
$list-group-border-width:           $border-width;
$list-group-border-radius:          $border-radius;

$list-group-item-padding-y:         $spacer * .5;
$list-group-item-padding-x:         $spacer;
$list-group-item-bg-scale:          -80%;
$list-group-item-color-scale:       40%;

$list-group-hover-bg:               $gray-100;
$list-group-active-color:           $component-active-color;
$list-group-active-bg:              $component-active-bg;
$list-group-active-border-color:    $list-group-active-bg;

$list-group-disabled-color:         $gray-600;
$list-group-disabled-bg:            $list-group-bg;

$list-group-action-color:           $gray-700;
$list-group-action-hover-color:     $list-group-action-color;

$list-group-action-active-color:    $body-color;
$list-group-action-active-bg:       $gray-200;

Imvange

Byakoreshejwe muburyo $theme-colorsbwo kubyara ibyiciro bitandukanye bya .list-group-items.

@mixin list-group-item-variant($state, $background, $color) {
  .list-group-item-#{$state} {
    color: $color;
    background-color: $background;

    &.list-group-item-action {
      &:hover,
      &:focus {
        color: $color;
        background-color: shade-color($background, 10%);
      }

      &.active {
        color: $white;
        background-color: $color;
        border-color: $color;
      }
    }
  }
}

Umuzingi

Umuzingo utanga ibyiciro byo guhindura hamwe na list-group-item-variant()mixin.

// List group contextual variants
//
// Add modifier classes to change text and background color on individual items.
// Organizationally, this must come after the `:hover` states.

@each $state, $value in $theme-colors {
  $list-group-variant-bg: shift-color($value, $list-group-item-bg-scale);
  $list-group-variant-color: shift-color($value, $list-group-item-color-scale);
  @if (contrast-ratio($list-group-variant-bg, $list-group-variant-color) < $min-contrast-ratio) {
    $list-group-variant-color: mix($value, color-contrast($list-group-variant-bg), abs($list-group-item-color-scale));
  }

  @include list-group-item-variant($state, $list-group-variant-bg, $list-group-variant-color);
}

Imyitwarire ya JavaScript

Koresha tab JavaScript plugin-shyiramo kugiti cyawe cyangwa unyuze muri bootstrap.jsdosiye yakusanyijwe - kugirango wongere itsinda ryurutonde kugirango ukore imbonerahamwe yibirimo yibirimo.

<div class="row">
  <div class="col-4">
    <div class="list-group" id="list-tab" role="tablist">
      <a class="list-group-item list-group-item-action active" id="list-home-list" data-bs-toggle="list" href="#list-home" role="tab" aria-controls="list-home">Home</a>
      <a class="list-group-item list-group-item-action" id="list-profile-list" data-bs-toggle="list" href="#list-profile" role="tab" aria-controls="list-profile">Profile</a>
      <a class="list-group-item list-group-item-action" id="list-messages-list" data-bs-toggle="list" href="#list-messages" role="tab" aria-controls="list-messages">Messages</a>
      <a class="list-group-item list-group-item-action" id="list-settings-list" data-bs-toggle="list" href="#list-settings" role="tab" aria-controls="list-settings">Settings</a>
    </div>
  </div>
  <div class="col-8">
    <div class="tab-content" id="nav-tabContent">
      <div class="tab-pane fade show active" id="list-home" role="tabpanel" aria-labelledby="list-home-list">...</div>
      <div class="tab-pane fade" id="list-profile" role="tabpanel" aria-labelledby="list-profile-list">...</div>
      <div class="tab-pane fade" id="list-messages" role="tabpanel" aria-labelledby="list-messages-list">...</div>
      <div class="tab-pane fade" id="list-settings" role="tabpanel" aria-labelledby="list-settings-list">...</div>
    </div>
  </div>
</div>

Koresha ibiranga amakuru

Urashobora gukora urutonde rwitsinda ryanditse utanditse JavaScript iyo ari yo yose ugaragaza data-bs-toggle="list"cyangwa ku kintu. Koresha aya makuru ibiranga kuri .list-group-item.

<div role="tabpanel">
  <!-- List group -->
  <div class="list-group" id="myList" role="tablist">
    <a class="list-group-item list-group-item-action active" data-bs-toggle="list" href="#home" role="tab">Home</a>
    <a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#profile" role="tab">Profile</a>
    <a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#messages" role="tab">Messages</a>
    <a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#settings" role="tab">Settings</a>
  </div>

  <!-- Tab panes -->
  <div class="tab-content">
    <div class="tab-pane active" id="home" role="tabpanel">...</div>
    <div class="tab-pane" id="profile" role="tabpanel">...</div>
    <div class="tab-pane" id="messages" role="tabpanel">...</div>
    <div class="tab-pane" id="settings" role="tabpanel">...</div>
  </div>
</div>

Binyuze kuri JavaScript

Gushoboza urutonde rwibintu ukoresheje JavaScript (buri kintu cyurutonde kigomba gukoreshwa kugiti cye):

var triggerTabList = [].slice.call(document.querySelectorAll('#myTab a'))
triggerTabList.forEach(function (triggerEl) {
  var tabTrigger = new bootstrap.Tab(triggerEl)

  triggerEl.addEventListener('click', function (event) {
    event.preventDefault()
    tabTrigger.show()
  })
})

Urashobora gukora urutonde rwumuntu muburyo butandukanye:

var triggerEl = document.querySelector('#myTab a[href="#profile"]')
bootstrap.Tab.getInstance(triggerEl).show() // Select tab by name

var triggerFirstTabEl = document.querySelector('#myTab li:first-child a')
bootstrap.Tab.getInstance(triggerFirstTabEl).show() // Select first tab

Ingaruka zashize

Kugirango utume pansiyo ishire, ongera .fadekuri buri .tab-pane. Urupapuro rwa mbere rwa pane rugomba kandi .showgukora ibintu byambere bigaragara.

<div class="tab-content">
  <div class="tab-pane fade show active" id="home" role="tabpanel">...</div>
  <div class="tab-pane fade" id="profile" role="tabpanel">...</div>
  <div class="tab-pane fade" id="messages" role="tabpanel">...</div>
  <div class="tab-pane fade" id="settings" role="tabpanel">...</div>
</div>

Uburyo

constructor

Gukora urutonde rwibintu nibintu birimo. Tab igomba kuba ifite a data-bs-targetcyangwa hrefigamije icyerekezo cya kontineri muri DOM.

<div class="list-group" id="myList" role="tablist">
  <a class="list-group-item list-group-item-action active" data-bs-toggle="list" href="#home" role="tab">Home</a>
  <a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#profile" role="tab">Profile</a>
  <a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#messages" role="tab">Messages</a>
  <a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#settings" role="tab">Settings</a>
</div>

<div class="tab-content">
  <div class="tab-pane active" id="home" role="tabpanel">...</div>
  <div class="tab-pane" id="profile" role="tabpanel">...</div>
  <div class="tab-pane" id="messages" role="tabpanel">...</div>
  <div class="tab-pane" id="settings" role="tabpanel">...</div>
</div>

<script>
  var firstTabEl = document.querySelector('#myTab a:last-child')
  var firstTab = new bootstrap.Tab(firstTabEl)

  firstTab.show()
</script>

kwerekana

Hitamo urutonde rwatanzwe kandi rwerekane pane. Ibindi bintu byose byurutonde byari byatoranijwe mbere biba bitatoranijwe kandi pane bifitanye isano irahishe. Garuka kumuhamagara mbere yuko tab pane yerekanwe mubyukuri (urugero, mbere yuko shown.bs.tabibyabaye bibaho).

  var someListItemEl = document.querySelector('#someListItem')
  var tab = new bootstrap.Tab(someListItemEl)

  tab.show()

guta

Gusenya ikintu cyibintu.

Kubona

Uburyo buhamye bugufasha kubona urugero rwa tab rujyanye nibintu bya DOM

var triggerEl = document.querySelector('#trigger')
var tab = bootstrap.Tab.getInstance(triggerEl) // Returns a Bootstrap tab instance

GetOrCreateInstance

Uburyo buhamye butuma ubona urugero rwa tab rujyanye nibintu bya DOM, cyangwa gukora bundi bushya mugihe bitatangijwe

var triggerEl = document.querySelector('#trigger')
var tab = bootstrap.Tab.getOrCreateInstance(triggerEl) // Returns a Bootstrap tab instance

Ibyabaye

Iyo werekanye tab nshya, ibyabaye birashya muburyo bukurikira:

  1. hide.bs.tab(kuri tab ikora)
  2. show.bs.tab(kuri to-kwerekanwa tab)
  3. hidden.bs.tab(kurupapuro rwibanze rukora, kimwe hide.bs.tabnkicyabaye)
  4. shown.bs.tab(ku gishya-gikora gusa-cyerekanwe tab, kimwe kimwe show.bs.tabnicyabaye)

Niba nta tab yari isanzwe ikora, hide.bs.tabibyabaye hidden.bs.tabntibizasezererwa.

Ubwoko bwibyabaye Ibisobanuro
show.bs.tab Ibirori birasa kuri tab yerekana, ariko mbere yuko tab nshya yerekanwe. Koresha event.targetno event.relatedTargetgutondekanya tab ikora hamwe na tab yabanjirije gukora (niba ihari).
shown.bs.tab Ibirori birasa kuri tab yerekanwe nyuma ya tab yerekanwe. Koresha event.targetno event.relatedTargetgutondekanya tab ikora hamwe na tab yabanjirije gukora (niba ihari).
hide.bs.tab Ibirori birasa iyo tab nshya igomba kwerekanwa (nuko rero tab ikora ibanza igomba guhishwa). Koresha event.targetno event.relatedTargetkugenera icyerekezo gikora hamwe nigishya vuba-kugirango-gikore, kimwe.
hidden.bs.tab Ibirori birashya nyuma ya tab nshya yerekanwe (nuko rero tab yabanjirije gukora irahishe). Koresha event.targetno event.relatedTargetguhitamo intego yabanjirije gukora hamwe na tab nshya ikora, uko bikurikirana.
var tabElms = document.querySelectorAll('a[data-bs-toggle="list"]')
tabElms.forEach(function(tabElm) {
  tabElm.addEventListener('shown.bs.tab', function (event) {
    event.target // newly activated tab
    event.relatedTarget // previous active tab
  })
}