Source

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.

  • Cras justo ye odio ye
  • Dapibus ac ka baarakɛyɔrɔw la
  • Morbi leo risus ye
  • Porta ac ye fɛn ye min bɛ se ka kɛ
  • Vestibulum bɛ sɔrɔ eros la
<ul class="list-group">
  <li class="list-group-item">Cras justo odio</li>
  <li class="list-group-item">Dapibus ac facilisis in</li>
  <li class="list-group-item">Morbi leo risus</li>
  <li class="list-group-item">Porta ac consectetur ac</li>
  <li class="list-group-item">Vestibulum at eros</li>
</ul>

Fɛn minnu bɛ baara kɛ

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

  • Cras justo ye odio ye
  • Dapibus ac ka baarakɛyɔrɔw la
  • Morbi leo risus ye
  • Porta ac ye fɛn ye min bɛ se ka kɛ
  • Vestibulum bɛ sɔrɔ eros la
<ul class="list-group">
  <li class="list-group-item active">Cras justo odio</li>
  <li class="list-group-item">Dapibus ac facilisis in</li>
  <li class="list-group-item">Morbi leo risus</li>
  <li class="list-group-item">Porta ac consectetur ac</li>
  <li class="list-group-item">Vestibulum at eros</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).

  • Cras justo ye odio ye
  • Dapibus ac ka baarakɛyɔrɔw la
  • Morbi leo risus ye
  • Porta ac ye fɛn ye min bɛ se ka kɛ
  • Vestibulum bɛ sɔrɔ eros la
<ul class="list-group">
  <li class="list-group-item disabled">Cras justo odio</li>
  <li class="list-group-item">Dapibus ac facilisis in</li>
  <li class="list-group-item">Morbi leo risus</li>
  <li class="list-group-item">Porta ac consectetur ac</li>
  <li class="list-group-item">Vestibulum at eros</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">
    Cras justo odio
  </a>
  <a href="#" class="list-group-item list-group-item-action">Dapibus ac facilisis in</a>
  <a href="#" class="list-group-item list-group-item-action">Morbi leo risus</a>
  <a href="#" class="list-group-item list-group-item-action">Porta ac consectetur ac</a>
  <a href="#" class="list-group-item list-group-item-action disabled">Vestibulum at eros</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">
    Cras justo odio
  </button>
  <button type="button" class="list-group-item list-group-item-action">Dapibus ac facilisis in</button>
  <button type="button" class="list-group-item list-group-item-action">Morbi leo risus</button>
  <button type="button" class="list-group-item list-group-item-action">Porta ac consectetur ac</button>
  <button type="button" class="list-group-item list-group-item-action" disabled>Vestibulum at eros</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).

  • Cras justo ye odio ye
  • Dapibus ac ka baarakɛyɔrɔw la
  • Morbi leo risus ye
  • Porta ac ye fɛn ye min bɛ se ka kɛ
  • Vestibulum bɛ sɔrɔ eros la
<ul class="list-group list-group-flush">
  <li class="list-group-item">Cras justo odio</li>
  <li class="list-group-item">Dapibus ac facilisis in</li>
  <li class="list-group-item">Morbi leo risus</li>
  <li class="list-group-item">Porta ac consectetur ac</li>
  <li class="list-group-item">Vestibulum at eros</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.

  • Dapibus ac ka baarakɛyɔrɔw la
  • Nin ye lisi kulu fɔlɔ fɛn ye
  • Nin ye lisi kulu fɛn filanan ye
  • Nin ye ɲɛtaa lisi kulu fɛn ye
  • Nin ye faratiw lisɛli kulu fɛn ye
  • Nin ye lasɔmini lisi kulu fɛn ye
  • Nin ye info list kulu fɛn ye
  • Nin ye yeelen lisi kulu fɛn ye
  • Nin ye dibi lisi kulu fɛn ye
<ul class="list-group">
  <li class="list-group-item">Dapibus ac facilisis in</li>


  <li class="list-group-item list-group-item-primary">This is a primary list group item</li>
  <li class="list-group-item list-group-item-secondary">This is a secondary list group item</li>
  <li class="list-group-item list-group-item-success">This is a success list group item</li>
  <li class="list-group-item list-group-item-danger">This is a danger list group item</li>
  <li class="list-group-item list-group-item-warning">This is a warning list group item</li>
  <li class="list-group-item list-group-item-info">This is a info list group item</li>
  <li class="list-group-item list-group-item-light">This is a light list group item</li>
  <li class="list-group-item list-group-item-dark">This is a 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">Dapibus ac facilisis in</a>


  <a href="#" class="list-group-item list-group-item-action list-group-item-primary">This is a primary list group item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-secondary">This is a secondary list group item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-success">This is a success list group item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-danger">This is a danger list group item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-warning">This is a warning list group item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-info">This is a info list group item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-light">This is a light list group item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-dark">This is a 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 .sr-onlykalan 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 .

  • Cras justo ye odio ye14 ye
  • Dapibus ac ka baarakɛyɔrɔw la2 ye
  • Morbi leo risus ye1 ye
<ul class="list-group">
  <li class="list-group-item d-flex justify-content-between align-items-center">
    Cras justo odio
    <span class="badge badge-primary badge-pill">14</span>
  </li>
  <li class="list-group-item d-flex justify-content-between align-items-center">
    Dapibus ac facilisis in
    <span class="badge badge-primary badge-pill">2</span>
  </li>
  <li class="list-group-item d-flex justify-content-between align-items-center">
    Morbi leo risus
    <span class="badge badge-primary badge-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 flex-column align-items-start active">
    <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">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
    <small>Donec id elit non mi porta.</small>
  </a>
  <a href="#" class="list-group-item list-group-item-action flex-column align-items-start">
    <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">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
    <small class="text-muted">Donec id elit non mi porta.</small>
  </a>
  <a href="#" class="list-group-item list-group-item-action flex-column align-items-start">
    <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">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
    <small class="text-muted">Donec id elit non mi porta.</small>
  </a>
</div>

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-toggle="list" href="#list-home" role="tab" aria-controls="home">Home</a>
      <a class="list-group-item list-group-item-action" id="list-profile-list" data-toggle="list" href="#list-profile" role="tab" aria-controls="profile">Profile</a>
      <a class="list-group-item list-group-item-action" id="list-messages-list" data-toggle="list" href="#list-messages" role="tab" aria-controls="messages">Messages</a>
      <a class="list-group-item list-group-item-action" id="list-settings-list" data-toggle="list" href="#list-settings" role="tab" aria-controls="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 data-toggle="list"ye fɛn dɔ jira dɔrɔn walima a kan. Baara kɛ ni nin kunnafonidilanw ye .list-group-item.

<!-- List group -->
<div class="list-group" id="myList" role="tablist">
  <a class="list-group-item list-group-item-action active" data-toggle="list" href="#home" role="tab">Home</a>
  <a class="list-group-item list-group-item-action" data-toggle="list" href="#profile" role="tab">Profile</a>
  <a class="list-group-item list-group-item-action" data-toggle="list" href="#messages" role="tab">Messages</a>
  <a class="list-group-item list-group-item-action" data-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>

JavaScript fɛ

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

$('#myList a').on('click', function (e) {
  e.preventDefault()
  $(this).tab('show')
})

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

$('#myList a[href="#profile"]').tab('show') // Select tab by name
$('#myList a:first-child').tab('show') // Select first tab
$('#myList a:last-child').tab('show') // Select last tab
$('#myList a:nth-child(3)').tab('show') // Select third 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 kɔnɔko fɔlɔw kɛ fɛn yetaw 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

$().tab ye

A bɛ lisi fɛn dɔ ni kɔnɔkow minɛn dɔ baara. Tab ka kan ka kɛ ni a ye data-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-toggle="list" href="#home" role="tab">Home</a>
  <a class="list-group-item list-group-item-action" data-toggle="list" href="#profile" role="tab">Profile</a>
  <a class="list-group-item list-group-item-action" data-toggle="list" href="#messages" role="tab">Messages</a>
  <a class="list-group-item list-group-item-action" data-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>
  $(function () {
    $('#myList a:last-child').tab('show')
  })
</script>

.tab(' jira')

A bɛ lisi fɛn dilen sugandi ani k’a ni ɲɔgɔn cɛ yɔrɔ jira. Lisiti fɛn 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 sani tab pane ka jira tiɲɛ na (misali la, sanni ko shown.bs.tabkɛlen ka kɛ).

$('#someListItem').tab('show')

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
jira.bs.tab la 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.
jiralen.bs.tab ye 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.
dogo.bs.tab ye 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.
dogolen.bs.tab ye 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.
$('a[data-toggle="list"]').on('shown.bs.tab', function (e) {
  e.target // newly activated tab
  e.relatedTarget // previous active tab
})