Abɔtawo ƒe ƒuƒoƒo
Zã Bootstrap ƒe abɔta ƒe atsyã tɔxɛwo na nuwɔna le nuŋlɔɖiwo, dzeɖonyawo, kple bubuwo me kple kpekpeɖeŋu na lolome, nɔnɔme, kple bubuwo geɖe.
Kpɔɖeŋuwo
Bootstrap la lɔ abɔta ƒe atsyã geɖe siwo woɖo do ŋgɔ ɖe eme, wo dometɔ ɖesiaɖe wɔa eya ŋutɔ ƒe gɔmesese ƒe taɖodzinu, kple kpeɖeŋutɔ ʋee aɖewo siwo wotsɔ ƒu gbe ɖe eme hena dziɖuɖu geɖe wu.
Gɔmesese nana mɔ̃ɖaŋununya siwo kpena ɖe ame ŋu
Amadede zazã atsɔ akpe ɖe gɔmesese ŋu koe naa nukpɔkpɔ ƒe dzesi aɖe, si womagblɔ na kpekpeɖeŋunamɔ̃wo zazãlawo o – abe screen readers ene. Kpɔ egbɔ be nyatakaka siwo wotsɔ amadedea de dzesii la dze ƒã tso emenyawo ŋutɔ me (le kpɔɖeŋu me, nuŋɔŋlɔ si wokpɔna), alo wotsɔe de eme to mɔnu bubuwo dzi, abe nuŋɔŋlɔ bubu siwo woɣla kple .sr-only
klass la ene.
Tsɔ nuŋɔŋlɔwo babla nawɔ dɔ
Ne mèdi be abɔta ƒe nuŋɔŋlɔa naxatsa o la, àte ŋu atsɔ .text-nowrap
klass la akpe ɖe abɔta la ŋu. Le Sass me la, àteŋu aɖoe $btn-white-space: nowrap
be yeaxe mɔ ɖe nuŋɔŋlɔ ƒe babla nu na abɔti ɖesiaɖe.
Abɔta ƒe dzesiwo
Wotrɔ .btn
asi le klassawo ŋu be woazã kple <button>
element la. Gake àteŋu azã klass siawo ɖe <a>
alo <input>
elements hã dzi (togbɔ be web-browser aɖewo ate ŋu awɔ gɔmeɖeɖe si to vovo vie ŋudɔ hã).
Ne èle abɔta ƒe hatsotsowo zãm ɖe <a>
nusiwo wozãna tsɔ dzea axaa me dɔwɔwɔ gɔme (abe nyatakakawo ƒe ƒuƒoƒo ene), tsɔ wu be woatsɔ kadodo aɖo axa yeyewo alo akpa siwo le axa si li fifia me la, ele be woana kadodo siawo a role="button"
be woaɖe woƒe taɖodzinu afia mɔ̃ɖaŋununya siwo kpena ɖe ame ŋu abe screen nuxlẽmɔ̃wo.
Gblɔ nyatakakadzraɖoƒea ƒe dzesiwo
Èhiã abɔta, gake menye megbe amadede kpekpe siwo wotsɔ vɛ oa? .btn-outline-*
Tsɔ esiwo nàtsɔ aɖe megbenɔnɔmetatawo kple amadedewo katã ɖa le abɔta ɖesiaɖe dzi la ɖɔ li tɔtrɔ ƒe hatsotso siwo woɖo ɖi la.
Agbɔsɔsɔmewo
Ðe nèdi be yeakpɔ abɔta siwo lolo wu alo esiwo le sue wua? Tsɔe kpe ɖe eŋu .btn-lg
alo .btn-sm
na lolome bubuwo.
Wɔ block level buttons—esiwo keke dzila ƒe kekeme bliboa—to .btn-block
.
Nɔnɔme si le dɔ wɔm
Abɔtawo adze ne wozi (kple megbenya si do viviti wu, liƒo si do viviti wu, kple vɔvɔli si wotsɔ de eme) ne wole dɔ wɔm. Mehiã be woatsɔ klass aɖe akpe ɖe <button>
s ŋu o elabena wozãa pseudo-class . Ke hã, àteŋu azi dzedzeme si le dɔ wɔm ma ke dzi kokoko kple .active
(eye nàde aria-pressed="true"
nɔnɔmea eme) nenye be ehiã be nàgbugbɔ nɔnɔmea awɔ le ɖoɖowɔɖi me.
Nuwɔametɔ ƒe nɔnɔme
Na abɔtawo nadze abe ɖe womele dɔ wɔm o ene to disabled
boolean nɔnɔme la tsɔtsɔ kpe ɖe <button>
element ɖesiaɖe ŋu me.
Nuwɔametɔ ƒe abɔta siwo zãa <a>
element la wɔa nu to vovo vie:
<a>
s medoa alɔdisabled
nɔnɔmea o, eyata ele be nàtsɔ.disabled
klass la akpe ɖe eŋu be wòadze abe nuwɔametɔ ene le nukpɔkpɔ me.- Wotsɔ atsyã aɖewo siwo asɔ na etsɔme la kpe ɖe eŋu be woawɔ nusiwo katã
pointer-events
le seke ƒe abɔtawo dzi la nuwɔametɔwoe. Le browser siwo doa alɔ nɔnɔme ma me la, màkpɔ cursor si wowɔ nuwɔametɔe la kura o. - Ele be nɔnɔmea nanɔ nuwɔametɔwo ƒe abɔtawo me
aria-disabled="true"
atsɔ afia nɔnɔme si me element la le na kpekpeɖeŋu mɔ̃ɖaŋunuwo.
Kadodo ƒe dɔwɔwɔ ŋuti nuxlɔ̃ame
Klas .disabled
la zãna pointer-events: none
tsɔ dzea agbagba be yeawɔ <a>
s ƒe kadodo ƒe dɔwɔwɔ nuwɔametɔ, gake womeɖo CSS ƒe nɔnɔme ma ɖe ɖoɖo nu haɖe o. Tsɔ kpe ɖe eŋu la, le browser siwo doa alɔ gɔ̃ hã me la, womekpɔa pointer-events: none
ŋusẽ ɖe keyboard dzi yiyi dzi o, si fia be keyboard zãla siwo kpɔa nu kple mɔ̃ɖaŋununya siwo kpena ɖe ame ŋu zãlawo ate ŋu awɔ kadodo siawo ŋudɔ kokoko. Eyata be nànɔ dedie la, tsɔ tabindex="-1"
nɔnɔme aɖe kpe ɖe kadodo siawo ŋu (be nàxe mɔ na wo be woagaxɔ keyboard ƒe susu o) eye nàzã JavaScript si wowɔ ɖe ɖoɖo nu atsɔ awɔ woƒe dɔwɔwɔ ŋudɔ o.
Abɔta ƒe kpeɖeŋutɔ
Wɔ geɖe wu kple abɔtawo. Dzɔdzɔmeŋusẽ ƒe abɔta gblɔ alo wɔ abɔta ƒe ƒuƒoƒowo na akpa geɖe abe dɔwɔnu ƒe ʋuƒo ene.
Trɔ asi le dukɔwo ŋu
Tsɔ kpe ɖe eŋu data-toggle="button"
be nàtrɔ asi le abɔta aɖe ƒe active
nɔnɔme ŋu. Ne èle asi trɔm le abɔta aɖe ŋu do ŋgɔ la, ele be nàtsɔ asi akpe ɖe .active
klass la ŋu eye aria-pressed="true"
nàtsɔe akpe ɖe <button>
.
Dzesiɖaka kple radio ƒe dzesiwo
Woateŋu awɔ Bootstrap ƒe .button
atsyãwo ŋudɔ ɖe nu bubuwo ŋu, abe <label>
s ene, be woana dzesiɖaka alo radio ƒe atsyã ƒe abɔta ƒe tɔtrɔ. Tsɔe kpe data-toggle="buttons"
ɖe a .btn-group
si me abɔta mawo siwo ŋu wotrɔ asi le la le ŋu be woana woƒe tɔtrɔ ƒe nuwɔna nawɔ dɔ to JavaScript dzi eye nàtsɔ s siwo le wò abɔtawo me ƒe .btn-group-toggle
atsyã akpe ɖe eŋu. De dzesii be àte ŋu awɔ abɔta ɖeka siwo ŋu ŋusẽ le alo woƒe ƒuƒoƒowo.<input>
Wotrɔa asi le nɔnɔme si wokpɔ na abɔta siawo ŋu to click
nudzɔdzɔ si le abɔta la dzi ko dzi. Ne èzã mɔnu bubu tsɔ trɔ asi le nyawo tsɔtsɔ de eme ŋu—le kpɔɖeŋu me, kple <input type="reset">
alo to asiwɔwɔ ɖe nyawo tsɔtsɔ de eme ƒe checked
nɔnɔme ŋudɔwɔwɔ me—la, ahiã be nàtrɔ asi .active
le nusi wotsɔ de eme la <label>
ŋu.
De dzesii be abɔta siwo wodo ŋgɔ la abia be nàtsɔ asi akpe .active
klass la ɖe nyawo tsɔtsɔ de eme ƒe <label>
.
Mɔnuwo
Nuwɔmɔnu | Nuɖᴐɖᴐ |
---|---|
$().button('toggle') |
Toggles push nɔnɔme. Enaa abɔta la dzena abe ɖe wowɔe ene. |
$().button('dispose') |
Tsrɔ̃a element aɖe ƒe abɔta. |