Color
Color supports checkbox
and radio
input types for displaying selected color.
Usage
css
@import "winduum/src/ui/color/index.css" layer(components);
Variants
Props
Installation
Follow instructions for individual framework usage below
Examples
Basic
html
<label class="ui-color" style="color: red">
<input type="checkbox" aria-label="Red">
</label>
<label class="ui-color" style="color: blue">
<input type="checkbox" aria-label="Blue">
</label>
<label class="ui-color" style="color: red; --ui-color-secondary: blue;">
<input type="checkbox" aria-label="Red & Blue">
</label>
vue
<script setup lang="ts">
import { UiColor } from '@/components/ui/color'
</script>
<template>
<UiColor style="color: red">
<input type="checkbox" aria-label="Red">
</UiColor>
<UiColor style="color: blue">
<input type="checkbox" aria-label="Blue">
</UiColor>
<UiColor style="color: red; --ui-color-secondary: blue;">
<input type="checkbox" aria-label="Red & Blue">
</UiColor>
</template>
jsx
import { UiColor } from "@/components/ui/color"
export function Example() {
return (
<>
<UiColor style="color: red">
<input type="checkbox" aria-label="Red" />
</UiColor>
<UiColor style="color: blue">
<input type="checkbox" aria-label="Blue" />
</UiColor>
<UiColor style="color: red; --ui-color-secondary: blue;">
<input type="checkbox" aria-label="Red & Blue" />
</UiColor>
</>
)
}
Disabled
html
<label class="ui-color" style="color: red">
<input type="checkbox" disabled>
</label>
<label class="ui-color" style="color: blue">
<input type="checkbox" disabled>
</label>
<label class="ui-color" style="color: red; --ui-color-secondary: blue;">
<input type="checkbox" disabled>
</label>