checkbox
Card checkbox group with icons
Card checkbox group with icons
Загрузка превью…
src/checkbox/c-checkbox-12.vue
<!--
Расхождение с апстримом: `IconPlaceholder` заменена инлайновым `<svg>`
(lucide-react v0.545.0 "laptop"/"mail"/"smartphone") — см. docs/PORTING.md §5.
-->
<script setup lang="ts">
import { Card } from "@/components/ui/card"
import { Checkbox } from "@/components/ui/checkbox"
import { Field, FieldGroup, FieldLabel, FieldTitle } from "@/components/ui/field"
import { Separator } from "@/components/ui/separator"
</script>
<template>
<Card class="w-full max-w-xs p-0">
<FieldGroup class="gap-0">
<Field>
<FieldLabel class="justify-between px-4 py-3">
<FieldTitle class="flex items-center gap-2">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
class="lucide lucide-laptop size-4 opacity-60"
>
<path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z" />
<path d="M20.054 15.987H3.946" />
</svg>
Push notifications
</FieldTitle>
<Checkbox :default-value="true" />
</FieldLabel>
</Field>
<Separator />
<Field>
<FieldLabel class="justify-between px-4 py-3">
<FieldTitle class="flex items-center gap-2">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
class="lucide lucide-mail size-4 opacity-60"
>
<path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" />
<rect x="2" y="4" width="20" height="16" rx="2" />
</svg>
Email notifications
</FieldTitle>
<Checkbox />
</FieldLabel>
</Field>
<Separator />
<Field>
<FieldLabel class="justify-between px-4 py-3">
<FieldTitle class="flex items-center gap-2">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
class="lucide lucide-smartphone size-4 opacity-60"
>
<rect width="14" height="20" x="5" y="2" rx="2" ry="2" />
<path d="M12 18h.01" />
</svg>
SMS notifications
</FieldTitle>
<Checkbox />
</FieldLabel>
</Field>
</FieldGroup>
</Card>
</template>