SOptionGroup <s-option-group>
ts
import { SOptionGroup } from 'polaris-vue-elements'Example
<SOptionGroup> doesn't render on its own — it groups related <SOption> children under a label inside an <SSelect>.
Value: (none)
vue
<script setup>
import { ref } from 'vue'
import { SSelect, SOption, SOptionGroup } from 'polaris-vue-elements'
const value = ref('')
</script>
<template>
<SSelect label="Shipping region" placeholder="Select a region" v-model="value">
<!-- SOptionGroup labels a cluster of SOption children -->
<SOptionGroup label="North America">
<SOption value="us">United States</SOption>
<SOption value="ca">Canada</SOption>
</SOptionGroup>
<SOptionGroup label="Europe">
<SOption value="fr">France</SOption>
<SOption value="de">Germany</SOption>
</SOptionGroup>
</SSelect>
<p>Value: {{ value }}</p>
</template>Props
| Prop | Type | Description |
|---|---|---|
disabled | boolean | Whether the options within this group can be selected or not. |
label | string | The user-facing label for this group of options. |
Slots
| Slot | Description |
|---|---|
default | The options a user can select from. Accepts Option components. |