Skip to content

Check

Check supports checkbox and radio input types

View Source 

Usage

css
@import "winduum/src/components/check/index.css" layer(components);

Variants

  • default 
  • interactive 
  • invalid 

Props

  • default 
  • interactive 

Installation

Follow instructions for individual framework usage below

  • winduum 
  • winduum-vue 
  • winduum-react 

Examples

Basic

html
<div class="x-check">
    <input type="checkbox">
    Checkbox
</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">
    Radio
</div>
<label class="x-check">
    <input type="radio" name="radio">
</label>
vue
<script setup lang="ts">
    import { UiCheck } from '@/components/check'
</script>

<template>
    <UiCheck>
        <input type="radio">
        Radio
    </UiCheck>
    <UiCheck>
        <input type="radio">
    </UiCheck>
</template>
jsx
import { UiCheck } from "@/components/check"

export function Example() {
    return (
        <>
            <UiCheck>
                <input type="radio" />
                Radio
            </UiCheck>
            <UiCheck>
                <input type="radio" />
            </UiCheck>
        </>
    )
}

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" disabled>
    Checkbox
</div>
<label class="x-check">
    <input type="checkbox" disabled>
</label>
html
<div class="x-check">
    <input type="radio" disabled>
    Radio
</div>
<label class="x-check">
    <input type="radio" disabled>
</label>

Validation

html
<form class="validated">
    <div class="x-check">
        <input type="checkbox" id="checkbox" required>
        <label for="checkbox">Checkbox</label>
    </div>
</form>
html
<form class="validated">
    <div class="x-check">
        <input type="radio" id="radio" required>
        <label for="radio">Radio</label>
    </div>
</form>

Released under the MIT License.