Lista di grup
List grup na wan fleksibul ɛn pawaful kɔmpɔnɛnt fɔ sho wan siriɔs kɔntinyu. Modify ɛn ɛkstɛnd dɛn fɔ sɔpɔt jɔs lɛk ɛni kɔntinyu insay.
Di list grup we impɔtant pas ɔl na wan list we nɔ ɔda wit di tin dɛn we de na di list ɛn di rayt klas dɛn. Bil pan am wit di opshɔn dɛn we de kam, ɔ wit yu yon CSS as nid de.
- Kras jɔsto odio
- Dapibus ac fasilisis in
- Morbi leo risus
- Porta ac konsectetur wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan
- Vestibulum na di eros
<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>
Ad .active
to a .list-group-item
fɔ sho di aktif sɛlɛkshɔn we de naw.
- Kras jɔsto odio
- Dapibus ac fasilisis in
- Morbi leo risus
- Porta ac konsectetur wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan
- Vestibulum na di eros
<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>
Ad .disabled
to a .list-group-item
fɔ mek i tan lɛk se i nɔ ebul fɔ wok. Notis se sɔm ɛlimɛnt dɛn wit .disabled
go nid bak kɔstɔm JavaSkript fɔ fulɔp fɔ disable dɛn klik ivin dɛn (ɛgz., link dɛn).
- Kras jɔsto odio
- Dapibus ac fasilisis in
- Morbi leo risus
- Porta ac konsectetur wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan
- Vestibulum na di eros
<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>
Yuz <a>
s ɔ <button>
s fɔ mek akshɔnable list grup aytem dɛn wit hova, disabled, ɛn aktiv stet dɛn bay we yu ad .list-group-item-action
. Wi de separet dɛn pseudo-klas ya fɔ mek shɔ se list grup dɛn we dɛn mek wit nɔ-intaraktiv ɛlimɛnt dɛn (lɛk <li>
s ɔ <div>
s) nɔ de gi klik ɔ tap afɔdans.
Mek shɔ se yu nɔ yuz di standad .btn
klas dɛn we de ya .
<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>
Wit <button>
s, yu kin mek yus bak to di disabled
atribyut insted of di .disabled
klas. I sɔri fɔ no se <a>
s nɔ de sɔpɔt di disabled atribyut.
<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>
Ad .list-group-flush
fɔ pul sɔm bɔda dɛn ɛn rawnd kɔna dɛn fɔ rɛnd list grup aytem dɛn ed-to-ɛj insay wan mama kɔntena (ɛgz., kad dɛn).
- Kras jɔsto odio
- Dapibus ac fasilisis in
- Morbi leo risus
- Porta ac konsectetur wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan wan
- Vestibulum na di eros
<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>
Yuz kɔntɛkstual klas fɔ stayl list aytem dɛn wit stetful bakgrɔn ɛn kɔlɔ.
- Dapibus ac fasilisis in
- Dis na wan praymari list grup aytem
- Dis na sɛkɔndari list grup aytem
- Dis na wan sakses list grup aytem
- Dis na wan denja list grup aytem
- Dis na wan wɔnin list grup aytem
- Dis na wan info list grup aytem
- Dis na layt list grup aytem
- Dis na wan dak list grup aytem
<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>
Kɔntɛkstual klas dɛn kin wok bak wit .list-group-item-action
. Notis di addɛshɔn fɔ di hova stayl dɛn ya we nɔ de na di ɛgzampul we bin dɔn pas. Di .active
stet de sɔpɔt bak; aplay am fɔ sho wan aktif sɛlɛkshɔn pan wan kɔntɛkstual list grup aytem.
<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>
Fɔ gi minin to ɛtɛknɔlɔji dɛn we de ɛp
Yuz kala fɔ ad minin de jɔs gi wan vijual indikashɔn, we dɛn nɔ go gi to di wan dɛn we de yuz ɛtɛknɔlɔji dɛn we de ɛp – lɛk skrin rida dɛn. Mek shɔ se di infɔmeshɔn we dɛn sho wit di kɔlɔ de sho klia wan frɔm di tin we de insay insɛf (ɛgz. di tɛks we yu de si), ɔ dɛn put am insay ɔda we dɛn, lɛk ɔda tɛks we dɛn ayd wit di .sr-only
klas.
Ad badge dɛn to ɛni list grup aytem fɔ sho di kɔnt dɛn we dɛn nɔ rid, di tin dɛn we dɛn de du, ɛn ɔda tin dɛn wit di ɛp we sɔm yutiliti dɛn de gi .
- Kras jɔsto odio14 we de tɔk bɔt
- Dapibus ac fasilisis in2. Di wan dɛn we de
- Morbi leo risus1. Di wan dɛn we de
<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>
Ad klos to ɛni HTML insay, ivin fɔ link list grup dɛn lɛk di wan we de dɔŋ ya, wit di ɛp fɔ flexbox utilities .
Lista di grup aytem edlayn
3 dez bifoDonec id elit non mi porta gravida na eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit we nɔto mi porta.Lista di grup aytem edlayn
3 dez bifoDonec id elit non mi porta gravida na eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit we nɔto mi porta.Lista di grup aytem edlayn
3 dez bifoDonec id elit non mi porta gravida na eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit we nɔto mi porta.<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>
Yuz di tab JavaSkript plɔgin—inklud am wan wan ɔ tru di bootstrap.js
fayl we dɛn dɔn kɔmpilayt—fɔ ɛkstɛnd wi list grup fɔ mek tabbul pan dɛn fɔ lokal kɔntinyu.
Yu kin aktiv wan list grup nevigishɔn we yu nɔ rayt ɛni JavaSkript bay we yu jɔs spɛsifa data-toggle="list"
ɔ pan wan ɛlimɛnt. Yuz dɛn data atribyut dɛn ya na .list-group-item
.
Enable tabbable list item via JavaScript (ɛni list aytem nid fɔ aktiv wan wan):
Yu kin aktiv wan wan list aytem insay sɔm we dɛn:
Fɔ mek tab dɛn panɛl fayn insay, ad .fade
to ɛni wan pan dɛn .tab-pane
. Di fɔs tab pan fɔ gɛt bak .show
fɔ mek di fɔs tin dɛn we de insay de sho.
Aktiv wan list aytem ɛlimɛnt ɛn kɔntinyu kɔntena. Tab fɔ gɛt ɛni wan pan wan data-target
ɔ wan href
we de tɔch wan kɔntena node na di DOM.
Pik di list aytem we dɛn gi ɛn sho di pan we gɛt fɔ du wit am. Ɛni ɔda list aytem we dɛn bin dɔn pik bifo tɛm nɔ kin pik ɛn di pan we gɛt fɔ du wit am kin ayd. Ritɔn to di pɔsin we kɔl bifo dɛn rili sho di tab pan (fɔ ɛgzampul, bifo di shown.bs.tab
tin apin).
We yu de sho nyu tab, di tin dɛn we de apin de faya insay di ɔda we we de dɔŋ ya:
hide.bs.tab
(na di tab we de wok naw)show.bs.tab
(na di tab we dɛn go sho)hidden.bs.tab
(na di fɔs aktif tab, di sem wan we bin de fɔ dihide.bs.tab
ivin)shown.bs.tab
(na di nyu-aktiv tab we jɔs sho, di sem wan we de fɔ dishow.bs.tab
ivin)
If no tab nɔ bin dɔn ɔlrɛdi aktif, di hide.bs.tab
ɛn hidden.bs.tab
ivin dɛn nɔ go faya.
Di kayn tin we apin | Tɔk bɔt |
---|---|
sho.bs.tab fɔ sho | Dis ivent de faya pan tab sho, bɔt bifo dɛn dɔn sho di nyu tab. Yuz event.target ɛn event.relatedTarget fɔ tɔch di aktiv tab ɛn di aktiv tab we bin de bifo (if i de) rispɛktful wan. |
we dɛn sho.bs.tab | Dis ivent de faya pan tab sho afta dɛn dɔn sho wan tab. Yuz event.target ɛn event.relatedTarget fɔ tɔch di aktiv tab ɛn di aktiv tab we bin de bifo (if i de) rispɛktful wan. |
ayd.bs.tab fɔ di wan dɛn we de | Dis ivent de faya we dɛn fɔ sho nyu tab (ɛn so di fɔs aktif tab fɔ ayd). Yuz event.target ɛn event.relatedTarget fɔ tɔch di tab we de wok naw ɛn di nyu tab we go aktiv jisnɔ, rispɛktful wan. |
di tab we dɛn ayd.bs | Dis ivent de faya afta dɛn dɔn sho nyu tab (ɛn so di fɔs aktif tab de ayd). Yuz event.target ɛn event.relatedTarget fɔ tɔch di fɔs aktif tab ɛn di nyu aktif tab, rispɛktful wan. |