Tlula eka nhlokomhaka-nkulu Tlula eka docs navigation
in English

Ntlawa wa swikomba-nkarhi

Hlengeleta nxaxamelo wa swikomba-nkarhi swin’we eka layini yin’we kutani u swi hlanganisa hi kholomo leyi yimisiweke.

Xikombiso xa xisekelo

Pfuxeta nxaxamelo wa swikomba-nkarhi hi .btnin .btn-group.

<div class="btn-group" role="group" aria-label="Basic example">
  <button type="button" class="btn btn-primary">Left</button>
  <button type="button" class="btn btn-primary">Middle</button>
  <button type="button" class="btn btn-primary">Right</button>
</div>
Tiyisisa leswaku swi lulamile rolenaswona u nyika lebula

Leswaku thekinoloji yo pfuneta (yo tanihi swihlaya-swikirini) yi hundzisela leswaku nxaxamelo wa swikomba-nkarhi wu hlengeletiwile, ku rolefanele ku nyikeriwa xihlawulekisi lexi faneleke. Eka mintlawa ya swikomba-nkarhi, leswi swi ta va role="group", kasi tibarhi ta switirhisiwa ti fanele ku va na role="toolbar".

Ku engetela kwalaho, mintlawa na tibarhi ta switirhisiwa swi fanele ku nyikiwa lebula leyi nga erivaleni, tanihileswi thekinoloji yo tala yo pfuneta handle ka sweswo yi nga ta ka yi nga ti tivisi, hambileswi ku nga na xihlawulekisi xa xiave lexi faneleke. Eka swikombiso leswi nyikiweke laha, hi tirhisa aria-label, kambe swin’wana swo fana na aria-labelledbyswona swi nga tirhisiwa.

Titlilasi leti ti nga tlhela ti engeteriwa eka mintlawa ya swihlanganisi, tanihi ndlela yin’wana eka .navswiphemu swa ku famba-famba .

<div class="btn-group">
  <a href="#" class="btn btn-primary active" aria-current="page">Active link</a>
  <a href="#" class="btn btn-primary">Link</a>
  <a href="#" class="btn btn-primary">Link</a>
</div>

Switayili leswi pfanganisiweke

<div class="btn-group" role="group" aria-label="Basic mixed styles example">
  <button type="button" class="btn btn-danger">Left</button>
  <button type="button" class="btn btn-warning">Middle</button>
  <button type="button" class="btn btn-success">Right</button>
</div>

Switayili leswi andlariweke

<div class="btn-group" role="group" aria-label="Basic outlined example">
  <button type="button" class="btn btn-outline-primary">Left</button>
  <button type="button" class="btn btn-outline-primary">Middle</button>
  <button type="button" class="btn btn-outline-primary">Right</button>
</div>

Bokisi ro kambela na mintlawa ya swikomba-nkarhi swa xiya-ni-moya

Hlanganisa bokisi ro kambela leri fanaka ni swikomba-nkarhi ni swikomba-nkarhi leswi cinca-cincaka swa xiya-ni-moya swi va ntlawa wa swikomba-nkarhi lowu langutekaka wu nga ri na swiphiqo.

<div class="btn-group" role="group" aria-label="Basic checkbox toggle button group">
  <input type="checkbox" class="btn-check" id="btncheck1" autocomplete="off">
  <label class="btn btn-outline-primary" for="btncheck1">Checkbox 1</label>

  <input type="checkbox" class="btn-check" id="btncheck2" autocomplete="off">
  <label class="btn btn-outline-primary" for="btncheck2">Checkbox 2</label>

  <input type="checkbox" class="btn-check" id="btncheck3" autocomplete="off">
  <label class="btn btn-outline-primary" for="btncheck3">Checkbox 3</label>
</div>
<div class="btn-group" role="group" aria-label="Basic radio toggle button group">
  <input type="radio" class="btn-check" name="btnradio" id="btnradio1" autocomplete="off" checked>
  <label class="btn btn-outline-primary" for="btnradio1">Radio 1</label>

  <input type="radio" class="btn-check" name="btnradio" id="btnradio2" autocomplete="off">
  <label class="btn btn-outline-primary" for="btnradio2">Radio 2</label>

  <input type="radio" class="btn-check" name="btnradio" id="btnradio3" autocomplete="off">
  <label class="btn btn-outline-primary" for="btnradio3">Radio 3</label>
</div>

Xitirhisiwa xa buti

Hlanganisa tisethi ta mintlawa ya swikomba-nkarhi eka tibari ta switirhisiwa swa swikomba-nkarhi swa swiphemu leswi rharhanganeke swinene. Tirhisa titlilasi ta vukorhokeri tanihilaha swi lavekaka hakona ku hambanyisa mintlawa, swikomba-nkarhi ni swin’wana.

<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
  <div class="btn-group me-2" role="group" aria-label="First group">
    <button type="button" class="btn btn-primary">1</button>
    <button type="button" class="btn btn-primary">2</button>
    <button type="button" class="btn btn-primary">3</button>
    <button type="button" class="btn btn-primary">4</button>
  </div>
  <div class="btn-group me-2" role="group" aria-label="Second group">
    <button type="button" class="btn btn-secondary">5</button>
    <button type="button" class="btn btn-secondary">6</button>
    <button type="button" class="btn btn-secondary">7</button>
  </div>
  <div class="btn-group" role="group" aria-label="Third group">
    <button type="button" class="btn btn-info">8</button>
  </div>
</div>

Titwele u ntshunxekile ku hlanganisa mintlawa ya swingheniso na mintlawa ya swikomba-nkarhi eka tibarhi ta wena ta switirhisiwa. Ku fana na xikombiso lexi nga laha henhla, u ta lava switirhisiwa swin’wana hambileswi ku veka swilo hi ndlela leyinene.

<div class="btn-toolbar mb-3" role="toolbar" aria-label="Toolbar with button groups">
  <div class="btn-group me-2" role="group" aria-label="First group">
    <button type="button" class="btn btn-outline-secondary">1</button>
    <button type="button" class="btn btn-outline-secondary">2</button>
    <button type="button" class="btn btn-outline-secondary">3</button>
    <button type="button" class="btn btn-outline-secondary">4</button>
  </div>
  <div class="input-group">
    <div class="input-group-text" id="btnGroupAddon">@</div>
    <input type="text" class="form-control" placeholder="Input group example" aria-label="Input group example" aria-describedby="btnGroupAddon">
  </div>
</div>

<div class="btn-toolbar justify-content-between" role="toolbar" aria-label="Toolbar with button groups">
  <div class="btn-group" role="group" aria-label="First group">
    <button type="button" class="btn btn-outline-secondary">1</button>
    <button type="button" class="btn btn-outline-secondary">2</button>
    <button type="button" class="btn btn-outline-secondary">3</button>
    <button type="button" class="btn btn-outline-secondary">4</button>
  </div>
  <div class="input-group">
    <div class="input-group-text" id="btnGroupAddon2">@</div>
    <input type="text" class="form-control" placeholder="Input group example" aria-label="Input group example" aria-describedby="btnGroupAddon2">
  </div>
</div>

Ku pima mpimo

Ematshan’weni yo tirhisa titlilasi to pima mpimo wa buti eka buti yin’wana ni yin’wana eka ntlawa, engetela ntsena .btn-group-*eka yin’wana ni yin’wana .btn-group, ku katsa ni yin’wana ni yin’wana loko u endla swisaka swa mintlawa yo tala.



<div class="btn-group btn-group-lg" role="group" aria-label="...">...</div>
<div class="btn-group" role="group" aria-label="...">...</div>
<div class="btn-group btn-group-sm" role="group" aria-label="...">...</div>

Ku endla swisaka

Veka a .btn-groupendzeni ka yin’wana .btn-grouploko u lava timenyu leti nga ehansi leti pfanganisiweke ni nxaxamelo wa swikomba-nkarhi.

<div class="btn-group" role="group" aria-label="Button group with nested dropdown">
  <button type="button" class="btn btn-primary">1</button>
  <button type="button" class="btn btn-primary">2</button>

  <div class="btn-group" role="group">
    <button id="btnGroupDrop1" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
      Dropdown
    </button>
    <ul class="dropdown-menu" aria-labelledby="btnGroupDrop1">
      <li><a class="dropdown-item" href="#">Dropdown link</a></li>
      <li><a class="dropdown-item" href="#">Dropdown link</a></li>
    </ul>
  </div>
</div>

Ku cinca-cinca loku yimisiweke

Endla leswaku sete ya swikomba-nkarhi yi vonaka yi hlanganisiwe hi ndlela yo olova ematshan’weni yo rhendzeleka. Split button dropdowns a yi seketeriwi laha.

<div class="btn-group-vertical">
  ...
</div>