Check
Check supports checkbox and radio input types
Installation
Follow instructions for individual framework usage below
Styles
Variants
Props
Examples
Basic
html
<div class="x-check">
<input type="checkbox" id="checkbox">
<label for="checkbox">Checkbox</label>
</div>
<label class="x-check">
<input type="checkbox">
</label>vue
<script setup lang="ts">
import { Check } from '@/components/check'
</script>
<template>
<Check>
<input type="checkbox">
Checkbox
</Check>
<Check>
<input type="checkbox">
</Check>
</template>jsx
import { Check } from "@/components/check"
export function Example() {
return (
<>
<Check>
<input type="checkbox" />
Checkbox
</Check>
<Check>
<input type="checkbox" />
</Check>
</>
)
}html
<div class="x-check">
<input type="radio" name="radio" id="radio">
<label for="radio">Radio</label>
</div>
<label class="x-check">
<input type="radio" name="radio">
</label>vue
<script setup lang="ts">
import { Check } from '@/components/check'
</script>
<template>
<Check>
<input type="radio">
Radio
</Check>
<Check>
<input type="radio">
</Check>
</template>jsx
import { Check } from "@/components/check"
export function Example() {
return (
<>
<Check>
<input type="radio" />
Radio
</Check>
<Check>
<input type="radio" />
</Check>
</>
)
}Label
html
<div class="x-check">
<input type="checkbox" id="checkbox">
<label for="checkbox">Checkbox</label>
</div>html
<div class="x-check">
<input type="radio" id="radio">
<label for="radio">Radio</label>
</div>Required
html
<div class="x-check">
<input type="checkbox" id="checkbox" required>
<label for="checkbox">Checkbox</label>
</div>html
<div class="x-check">
<input type="radio" id="radio" required>
<label for="radio">Radio</label>
</div>Disabled
html
<div class="x-check">
<input type="checkbox" id="checkbox" disabled>
<label for="checkbox">Checkbox</label>
</div>
<label class="x-check">
<input type="checkbox" disabled>
</label>html
<div class="x-check">
<input type="radio" id="radio" disabled>
<label for="radio">Radio</label>
</div>
<label class="x-check">
<input type="radio" disabled>
</label>Validation
html
<div class="x-check">
<input type="checkbox" id="checkbox" required>
<label for="checkbox">Checkbox</label>
</div>html
<div class="x-check">
<input type="radio" id="radio" required>
<label for="radio">Radio</label>
</div>