SelectSku quando variationsStyle="buttons".
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Renderiza opções de variação de produto como botões clicáveis com estado de indisponível.
SelectSku quando variationsStyle="buttons".
<VariantButton
:options="[
{ id: 1, value: 'P', available: true },
{ id: 2, value: 'M', available: true },
{ id: 3, value: 'G', available: false }
]"
:value="selectedOptionId"
:error="hasError"
@change="selectedOptionId = $event"
/>
| Propriedade | Tipo | Obrigatória | Valor padrão | Descrição |
|---|---|---|---|---|
options | Array | ❌ | [] | Lista de opções da variação. Cada item deve ter id, value e available (Boolean). |
value | Number | ❌ | 0 | ID da opção atualmente selecionada. |
error | Boolean | ❌ | false | Quando true, aplica borda de erro aos botões para indicar seleção obrigatória. |
disabled | Boolean | ❌ | false | Desabilita todos os botões de variação. |
| Evento | Payload | Descrição |
|---|---|---|
change | Number | Emitido com o id da opção selecionada ao clicar. |
Was this page helpful?