PvSegmentedControl
Documentation
Example
Source
HTML
<!--vue-sfc-example-->
<script setup lang="ts">
import PvSegmentedControl from "@/components/base/PvSegmentedControl/PvSegmentedControl.vue";
import { ref } from "vue";
const options = [
{
label: "Butcher",
value: "option-a",
},
{
label: "Baker",
value: "option-b",
},
{
label: "Candlestick maker",
value: "option-c",
},
];
const selectedOption = ref(options[0].value);
</script>
<template>
<PvSegmentedControl
:options="options"
v-model="selectedOption"
large
></PvSegmentedControl>
</template>
Properties
Prop Name | Type | Required | Default | Description |
---|---|---|---|---|
modelValue |
string |
yes |
N/A |
- |
options |
Option[] | OptionWithIcon[] |
yes |
N/A |
- |
iconOnly |
boolean | undefined |
no |
false |
- |
large |
boolean | undefined |
no |
false |
- |
Event Name | Type | Description |
---|---|---|
update:modelValue |
any[] |
- |