Düğme grubu
Dönem seçimi ya da araç çubuğu gibi ilgili düğmeleri bitişik, tek parça bir grup olarak gösterir.
zb:button-group zubazar/ui · ücretsiz (MIT)
Temel kullanım
BLADE
Gruptaki her düğmeye aşağıdaki sınıfları ekleyin; köşeleri ve bitişik kenarları bu sınıflar ayarlar.
<zb:button-group aria-label="Dönem">
<zb:button variant="white" class="!rounded-none first:!rounded-l last:!rounded-r -ml-px first:ml-0 relative hover:z-10 focus-visible:z-10">Gün</zb:button>
<zb:button variant="white" class="!rounded-none first:!rounded-l last:!rounded-r -ml-px first:ml-0 relative hover:z-10 focus-visible:z-10">Hafta</zb:button>
<zb:button variant="white" class="!rounded-none first:!rounded-l last:!rounded-r -ml-px first:ml-0 relative hover:z-10 focus-visible:z-10">Ay</zb:button>
</zb:button-group>
| Prop | Değerler |
|---|---|
düğmelerin class değeri | !rounded-none first:!rounded-l last:!rounded-r -ml-px first:ml-0 relative hover:z-10 focus-visible:z-10 |
İkonlu araç çubuğu
BLADE
Yalnız ikonlu düğmelerle (size="icon") sıkışık bir araç çubuğu kurun; her düğmeye aria-label ve title verin.
<zb:button-group aria-label="Kayıt işlemleri">
<zb:button variant="white" size="icon" aria-label="Düzenle" title="Düzenle" class="!rounded-none first:!rounded-l last:!rounded-r -ml-px first:ml-0 relative hover:z-10 focus-visible:z-10">
<zb:icon name="pencil-square" size="4" />
</zb:button>
<zb:button variant="white" size="icon" aria-label="Kopyala" title="Kopyala" class="!rounded-none first:!rounded-l last:!rounded-r -ml-px first:ml-0 relative hover:z-10 focus-visible:z-10">
<zb:icon name="document-duplicate" size="4" />
</zb:button>
<zb:button variant="white" size="icon" aria-label="Sil" title="Sil" class="!rounded-none first:!rounded-l last:!rounded-r -ml-px first:ml-0 relative hover:z-10 focus-visible:z-10">
<zb:icon name="trash" size="4" />
</zb:button>
</zb:button-group>
Prop'lar
Bileşenin aldığı değerler. Prop ve slot nedir?
| Prop | Tür | Varsayılan | Açıklama |
|---|---|---|---|
(öznitelikler) | — | — | Prop almaz; class, aria-label gibi öznitelikler kapsayıcıya eklenir |
Slot'lar: varsayılan (zb:button öğeleri)
Geliştirici notları
- Grup yalnız bir kapsayıcıdır ve
role="group"verir; grubun ne işe yaradığını ekran okuyucularaaria-labelile anlatın.