primevue-mirror/apps/volt/doc/toggleswitch/PreselectionDoc.vue

32 lines
710 B
Vue
Raw Permalink Normal View History

2025-03-01 16:44:31 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Enabling <i>checked</i> property displays the component as active initially.</p>
</DocSectionText>
<div class="card flex justify-center">
<ToggleSwitch v-model="checked" />
</div>
<DocSectionCode :code="code" />
</template>
<script setup>
2025-03-03 12:50:58 +00:00
import ToggleSwitch from '@/volt/toggleswitch';
2025-03-01 16:44:31 +00:00
import { ref } from 'vue';
const checked = ref(true);
const code = ref(`
<template>
<div class="card flex justify-center">
<ToggleSwitch v-model="checked" />
</div>
</template>
<script setup>
2025-03-03 12:50:58 +00:00
import ToggleSwitch from '@/volt/toggleswitch';
2025-03-01 16:44:31 +00:00
import { ref } from 'vue';
const checked = ref(true);
<\/script>
`);
</script>