开关

允许用户在选中和未选中之间切换的控件。

安装

bash
npx shadcn-vue@latest add switch

用法

vue
<script setup lang="ts">
import { Switch } from '@/components/ui/switch'
</script>

<template>
  <Switch />
</template>

示例

表单

Email Notifications

Receive emails about new products, features, and more.

Receive emails about your account security.

在 GitHub 上编辑此页面