Skip to content

Button group

te-button-group renders quantity joined buttons and tells you which one was clicked. Each button has its own slot.

Basic

vue
<te-button-group :quantity="3">
  <template #button-1>One</template>
  <template #button-2>Two</template>
  <template #button-3>Three</template>
</te-button-group>

Outlined, with one disabled

disabled is indexed from zero even though the click payload is 1-based.

vue
<te-button-group :quantity="3" type="danger" outlined :disabled="[false, true, false]">
  <template #button-1>One</template>
  <template #button-2>Two</template>
  <template #button-3>Three</template>
</te-button-group>

Props

PropTypeDefaultDescription
quantitynumber1How many buttons to render.
type'normal' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'pink' | 'purple' | 'light' | 'dark''primary'Colour variant, applied to every button.
size'small' | 'medium' | 'large''medium'Size, applied to every button.
outlinedbooleanfalseOutlined style.
disabledboolean[][]Per-button disabled state, indexed from 0.

Events

EventPayloadDescription
click{ index: number; event: MouseEvent }index is 1-based.

Slots

SlotPropsDescription
button-N{ index }Content of the Nth button, starting at button-1.

Released under the MIT License.