feat: add Checkbox and Radio field families
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
CheckboxContent,
|
||||
CheckboxControl,
|
||||
CheckboxIndicator,
|
||||
Checkbox,
|
||||
Label,
|
||||
} from "@heroui-vue/components";
|
||||
</script>
|
||||
<template>
|
||||
<div class="flex flex-col gap-6">
|
||||
<div class="flex flex-col gap-3">
|
||||
<Label class="text-muted">圆角复选框</Label>
|
||||
<Checkbox
|
||||
class="[&_[data-slot='checkbox-default-indicator--checkmark']]:size-2"
|
||||
name="small-rounded"
|
||||
>
|
||||
<CheckboxContent>
|
||||
<CheckboxControl class="size-3 rounded-full before:rounded-full">
|
||||
<CheckboxIndicator />
|
||||
</CheckboxControl>
|
||||
小尺寸
|
||||
</CheckboxContent>
|
||||
</Checkbox>
|
||||
</div>
|
||||
<div class="flex flex-col gap-3">
|
||||
<Checkbox name="default-rounded">
|
||||
<CheckboxContent>
|
||||
<CheckboxControl class="size-4 rounded-full before:rounded-full">
|
||||
<CheckboxIndicator />
|
||||
</CheckboxControl>
|
||||
默认尺寸
|
||||
</CheckboxContent>
|
||||
</Checkbox>
|
||||
</div>
|
||||
<div class="flex flex-col gap-3">
|
||||
<Checkbox name="large-rounded">
|
||||
<CheckboxContent>
|
||||
<CheckboxControl class="size-5 rounded-full before:rounded-full">
|
||||
<CheckboxIndicator />
|
||||
</CheckboxControl>
|
||||
大尺寸
|
||||
</CheckboxContent>
|
||||
</Checkbox>
|
||||
</div>
|
||||
<div class="flex flex-col gap-3">
|
||||
<Checkbox
|
||||
class="[&_[data-slot='checkbox-default-indicator--checkmark']]:size-4"
|
||||
name="xl-rounded"
|
||||
>
|
||||
<CheckboxContent>
|
||||
<CheckboxControl class="size-6 rounded-full before:rounded-full">
|
||||
<CheckboxIndicator />
|
||||
</CheckboxControl>
|
||||
特大尺寸
|
||||
</CheckboxContent>
|
||||
</Checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user