v0.0.2
Demolar (demo panel, yeni sekmede açılır)

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

Temel kullanım: görünüm
BLADE

Gruptaki her düğmeye aşağıdaki sınıfları ekleyin; köşeleri ve bitişik kenarları bu sınıflar ayarlar.

blade
<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>
PropDeğ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

İkonlu araç çubuğu: görünüm
BLADE

Yalnız ikonlu düğmelerle (size="icon") sıkışık bir araç çubuğu kurun; her düğmeye aria-label ve title verin.

blade
<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?

PropTürVarsayılanAçıklama
(öznitelikler)— — Prop almaz; class, aria-label gibi öznitelikler kapsayıcıya eklenir

Slot'lar: varsayılan (zb:button öğeleri)

Geliştirici notları

Olaylar, işaretler ve ayrıntılar
  • Grup yalnız bir kapsayıcıdır ve role="group" verir; grubun ne işe yaradığını ekran okuyuculara aria-label ile anlatın.
Zubazar UI · Zubazarİnsanlar için tasarlandı.