Tɛmɛn ka taa kunnafoni kunbabaw la Tɛmɛn ka taa docs navigation kan
in English

Lisiti kulu

Lisiti kuluw ye fɛn ye min bɛ se ka wuli ka bɔ a nɔ na ani min fanga ka bon walasa ka kunnafoni dɔw jira minnu bɛ tugu ɲɔgɔn na. Aw bɛ u ladilan ani k’u bonya walasa ka kunnafoni suguya o suguya dɛmɛ a kɔnɔ.

Misali jɔnjɔn

Lisiti kulu jɔnjɔnba ye lisi ye min ma labɛn ni lisi fɛnw ye ani kalasi bɛnnenw. Aw bɛ jɔ a kan ni sugandiliw ye minnu bɛ tugu o kɔ, walima ni aw yɛrɛ ka CSS ye i n’a fɔ a mago bɛ cogo min na.

  • Fɛn dɔ
  • Fɛn filanan
  • Fɛn sabanan
  • Fɛn naaninan dɔ
  • Ani duurunan
<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>

Fɛn minnu bɛ baara kɛ

A fara a kan .activewalasa .list-group-itemka sugandili kɛlen jira sisan.

  • Fɛn min bɛ baara kɛ
  • A second item
  • A third item
  • A fourth item
  • And a fifth one
<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>

Fɛn minnu bɛ se ka baara kɛ

A fara a kan .disabledwalasa a .list-group-itemka kɛ i n’a fɔ a tɛ se ka baara kɛ. A kɔlɔsi ko fɛn dɔw ni .disabledfana bɛna JavaScript ladamulen wajibiya walasa k’u ka klikɛli ko kɛlenw bali ka ban pewu (misali la, jɛgɛnsira).

  • Fɛn min ye fiyentɔ ye
  • A second item
  • A third item
  • A fourth item
  • And a fifth one
<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>

Baara kɛ ni <a>s walima <button>s ye walasa ka lisi kulu fɛnw dilan minnu bɛ se ka kɛ ni hover, disabled, ani active states ye ni farali .list-group-item-actionye . An bɛ nin pseudo-classes ninnu faranfasi walasa lisi kulu minnu dilannen don ni fɛnw ye minnu tɛ ɲɔgɔn sɔrɔ (i n’a fɔ <li>s walima <div>s) olu kana click walima tap affordance di.

aw ye aw jija aw kana baara kɛ ni .btnkalansen jɔnjɔnw ye yan .

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

Ni <button>s ye, i bɛ se fana ka baara kɛ ni disabledfɛnɲɛnɛma ye .disabledkalasi nɔ na. A fɔ man di nka, <a>s tɛ dɛmɛ don disabled attribute ma.

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

Aw bɛ a ko

Fàra ɲɔgɔn kan .list-group-flushwalasa ka dan dɔw Bɔ ani nkɔni bulamaw walasa ka lisi kulu fɛnw jira dakun na ka Taa dakun na bangebaga minɛn dɔ kɔnɔ (misali la, kartiw).

  • Fɛn dɔ
  • Fɛn filanan
  • Fɛn sabanan
  • Fɛn naaninan dɔ
  • Ani duurunan
<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>

Nimɔrɔ bɛ a la

Aw bɛ .list-group-numberedfɛn dɔ fara a kan (ani ka baara kɛ ni <ol>fɛn dɔ ye) walasa ka sugandi ka don lisi kulu fɛnw na minnu bɛ nimɔrɔ ye. Jatedenw bɛ dilan CSS fɛ (a ni <ol>s default browser styling tɛ kelen ye) walasa ka bila ka ɲɛ lisi kulu kɔnɔfɛnw kɔnɔ ani ka sira di ladamuni ɲuman ma.

Jateblaw bɛ Sɔrɔ ni counter-resetkan <ol>, ka sɔrɔ ka cogoya Kɛ k'u Blà ni ::beforepseudo-element ye <li>ni kan counter-incrementani content.

  1. Lisiti kɔnɔfɛn dɔ
  2. Lisiti kɔnɔfɛn dɔ
  3. Lisiti kɔnɔfɛn dɔ
<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>

Olu bɛ baara Kɛ kosɛbɛ ni ladamu kɔnɔkow ye fana.

  1. Kumakun fitinin
    Kɔnɔkow ka ɲɛsin lisi fɛn ma
    14 ye
  2. Kumakun fitinin
    Kɔnɔkow ka ɲɛsin lisi fɛn ma
    14 ye
  3. Kumakun fitinin
    Kɔnɔkow ka ɲɛsin lisi fɛn ma
    14 ye
<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>

Dalen

Fàra ɲɔgɔn kan .list-group-horizontalwalasa ka lisi kulu fɛnw labɛncogo Yɛlɛma ka Bɔ jɔlen na ka Taa jɛgɛlen na kariyɔrɔw bɛɛ la. O cogo kelen na, aw bɛ jaabi suguya dɔ sugandi .list-group-horizontal-{sm|md|lg|xl|xxl}walasa ka lisi kulu kɛ tilennen ye k’a daminɛ o kariyɔrɔ la min-width’ . Sisan , lisi kuluw horizontal tɛ se ka fara ɲɔgɔn kan ni flush list kuluw ye.

ProTip: Aw b’a fɛ ka lisi kulu fɛnw sɔrɔ minnu bonya bɛ bɛn ɲɔgɔn ma ni u bɛ jɛgɛn wa? Aw bɛ dɔ fara .flex-filllisi kulu kɔnɔfɛn kelen-kelen bɛɛ kan.

  • Fɛn dɔ
  • Fɛn filanan
  • Fɛn sabanan
  • Fɛn dɔ
  • Fɛn filanan
  • Fɛn sabanan
  • Fɛn dɔ
  • Fɛn filanan
  • Fɛn sabanan
  • Fɛn dɔ
  • Fɛn filanan
  • Fɛn sabanan
  • Fɛn dɔ
  • Fɛn filanan
  • Fɛn sabanan
  • Fɛn dɔ
  • Fɛn filanan
  • Fɛn sabanan
<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>

Kalanso minnu bɛ kɛ ka ɲɛsin ko kɛlenw ma

Baara kɛ ni contextual classes ye walasa ka fɛnw list cogoya jira ni u kɔkanna ni u kulɛri ye cogoya la.

  • Lisiti kulu fɛn nɔgɔman dɔ
  • Lisiti fɔlɔ kulu fɛn nɔgɔman dɔ
  • Lisiti filanan yɔrɔ nɔgɔman dɔ
  • A ye ɲɛtaa lisi kulu fɛn nɔgɔman ye
  • Faratiw lisi kulu fɛn nɔgɔman dɔ
  • Lakɔlɔsili lisi kulu fɛn nɔgɔman dɔ
  • A simple info list kulu fɛn
  • Yeelen lisi kulu fɛn nɔgɔman dɔ
  • Dibi lisi kulu fɛn nɔgɔman dɔ
<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>

Kalanso minnu bɛ kɛ sigida la , olu fana bɛ baara kɛ ni .list-group-item-action. A kɔlɔsi ko hover cogoyaw faralen don yan minnu tɛ misali tɛmɛnen na. Jamana fana bɛ dɛmɛ sɔrɔ .active; a waleya walasa ka sugandili baarakɛta jira sigida lisi kulu yɔrɔ dɔ kan.

<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>
Kɔrɔ lasecogo dɛmɛni fɛɛrɛw ma

Baara kɛli ni kulɛri ye walasa ka kɔrɔ fara a kan, o bɛ taamasiyɛn yelen dɔrɔn de di, min tɛna lase dɛmɛni fɛɛrɛw baarakɛlaw ma – i n’a fɔ ɛkran kalanbagaw. Aw ye aw jija kunnafoni minnu jiralen don ni kulɛri ye, olu bɛ ye ka bɔ kɔnɔkow yɛrɛ la (misali la sɛbɛn yelen), walima u bɛ don a kɔnɔ fɛɛrɛ wɛrɛw fɛ, i n’a fɔ sɛbɛn wɛrɛw minnu dogolen don ni .visually-hiddenkalan ye.

Ni badgew ye

Badge fara lisi kulu fɛn o fɛn kan walasa ka jate kalanbaliw, baara ani fɛn wɛrɛw jira ni nafamafɛn dɔw dɛmɛ ye .

  • Lisiti kɔnɔfɛn dɔ14 ye
  • Lisiti kɔnɔfɛn filanan2 ye
  • Lisiti kɔnɔfɛn sabanan1 ye
<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>

Kɔnɔkow minnu bɛ kɛ ka kɛɲɛ ni mɔgɔw sago ye

HTML fɛn o fɛn bɛ Se ka Fàra a kan, hali lisi kulu minnu bɛ ɲɔgɔn kan i n’a fɔ min bɛ duguma, ni flexbox utilities dɛmɛ ye .

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

Jateminɛ kɛyɔrɔw ani arajow

Bootstrap ka jatebɔyɔrɔw ni arajow bila lisi kulu kɔnɔfɛnw kɔnɔ ani k’u labɛn i n’a fɔ a mago bɛ cogo min na. Aw bɛ se ka baara kɛ n’u ye ni <label>s tɛ, nka aw hakili to a la ka fɛn dɔ aria-labelni nafa dɔ fara a kan walasa ka se ka sɔrɔ.

  • Fɔlɔ jatebɔyɔrɔ
  • Jateminɛ kɛcogo filanan
  • Jatebla sabanan
  • Jatebla naaninan
  • Jatebla duurunan
<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>

Wa ni i b’a fɛ <label>s as the .list-group-itemfor large hit areas, i bɛ se k’o kɛ, fana.

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

Yɛlɛma-yɛlɛmaw

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

Mixinw (Mixins).

Baara bɛ Kɛ ni ɲɔgɔn ye ni $theme-colorswalasa ka contextual variant classes (daɲɛw caman ɲɔgɔnna) Sɔrɔ .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;
      }
    }
  }
}

Bukulu

Loop min bɛ modifier classes (daɲɛw sɛgɛsɛgɛli) lawuli ni list-group-item-variant()mixin ye.

// 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);
}

JavaScript kɛcogo

Baara kɛ ni JavaScript plugin tab ye—aw k’a don a kelen-kelen na walima ka tɛmɛ bootstrap.jsdosiye lajɛlen fɛ—walasa k’an ka lisi kulu bonya walasa ka sigida kɔnɔkow tablɛtiw dilan.

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

Baara kɛ ni data attributes ye

I bɛ se ka lisi kulu navigatiɔn dɔ baara k’a sɔrɔ i ma JavaScript si sɛbɛn ni i ye a jira dɔrɔn data-bs-toggle="list"walima ni i ye fɛn dɔ jira. Baara kɛ ni nin kunnafonidilanw ye .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>

JavaScript fɛ

Tabbable list item daminɛ JavaScript fɛ (list item kelen-kelen bɛɛ ka kan ka baara kɛ kelen-kelen):

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()
  })
})

Aw bɛ se ka lisi fɛn kelen-kelen bɛɛ baara cogo caman na:

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

Fade nɔ ye

Walasa ka tabs panel fade in kɛ, i ka dɔ fara .fadeu kelen-kelen bɛɛ .tab-panekan . Tablo fɔlɔ fana ka kan .showka kɛ sababu ye ka fɔlɔ kɔnɔkow kɛ fɛn ye min bɛ ye.

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

Fɛɛrɛw

constructor

A bɛ lisi fɛn dɔ ni kɔnɔkow minɛn dɔ baara. Tab ka kan ka kɛ ni a ye data-bs-targetwalima ni hreftargeting a container node ye DOM kɔnɔ.

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

k'a jira

A bɛ lisi fɛn dilen sugandi ani k’a ni ɲɔgɔn cɛ yɔrɔ jira. Lisiti fɛn wɛrɛ o wɛrɛ min tun sugandira ka tɛmɛ, o bɛ kɛ sugandibali ye ani a ni ɲɔgɔn cɛ yɔrɔ bɛ dogo. A bɛ segin welebaga ma sanni tab pane ka jira tiɲɛ na (misali la, sanni ko shown.bs.tabkɛlen ka kɛ).

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

  tab.show()

ka a fili

A bɛ element dɔ ka tab tiɲɛ.

getInstance ye

Static method min b’a to i bɛ se ka tab instance sɔrɔ min bɛ tali kɛ DOM element dɔ la

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

sɔrɔWala ka Instance Dabɔ

Static method min b’a To i bɛ se ka tab instance sɔrɔ min bɛ tali Kɛ DOM element dɔ la, walima ka kura Dabɔ n’a sɔrɔla a ma Daminɛ

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

Ko minnu kɛra

Ni tab kura jira, ko kɛlenw bɛ tasuma don nin cogo la:

  1. hide.bs.tab(tab min bɛ baara la sisan)
  2. show.bs.tab(tabu min bɛna jira, o kan)
  3. hidden.bs.tab(tab active tɛmɛnen kan, o ni hide.bs.tabko kɛlen ta ye kelen ye)
  4. shown.bs.tab(tab min jirala sisan, o min bɛ baara kura kɛ, o ni show.bs.tabko kɛlen ta ye kelen ye)

Ni tab si tun tɛ baara la kaban, hide.bs.tabani hidden.bs.tabko kɛlenw tɛna wuli.

Ko kɛlen suguya Cogojirali
show.bs.tab Nin ko in bɛ tasuma don tab jirali la, nka sanni tab kura ka jira. Baara kɛ event.targetni ani event.relatedTargetye walasa ka tablo active ani tab active tɛmɛnen (ni o bɛ sɔrɔ) laɲini.
shown.bs.tab Nin ko in bɛ tasuma don tab jirali la tab jiralen kɔfɛ. Baara kɛ event.targetni ani event.relatedTargetye walasa ka tablo active ani tab active tɛmɛnen (ni o bɛ sɔrɔ) laɲini.
hide.bs.tab O ko in bɛ tasuma Bɔ ni tablo kura dɔ ka kan ka jira (wa o cogo la tab baarakɛta tɛmɛnen ka kan ka dogo). Baara kɛ event.targetni ani event.relatedTargetye walasa ka tab min bɛ baara la sisan ani tab kura min bɛna kɛ sɔɔni, o laɲini, o cogo kelen na.
hidden.bs.tab O ko in bɛ tasuma Bɔ tab kura jiralen kɔ (wa o cogo la tab baarakɛta tɛmɛnen bɛ dogo). Baara kɛ event.targetni ani event.relatedTargetye walasa ka tab baarakɛta tɛmɛnen ni tab baarakɛta kura laɲini, o cogo kelen na.
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
  })
}