feat: migrate public ColorSlider with docs and tests

This commit is contained in:
maoyingjie
2026-10-27 09:16:32 +08:00
parent e487bcc8ec
commit ce6c43eb47
31 changed files with 3386 additions and 122 deletions
@@ -0,0 +1,27 @@
<script setup lang="ts">
import {
ColorSlider,
ColorSliderOutput,
ColorSliderThumb,
ColorSliderTrack,
Label,
} from "@heroui-vue/components";
</script>
<template>
<ColorSlider
channel="hue"
class="w-full max-w-sm"
default-value="hsl(220, 70%, 50%)"
>
<Label class="font-medium text-foreground">色相</Label>
<ColorSliderOutput class="text-muted tabular-nums" />
<ColorSliderTrack
class="h-4! rounded-none! ring-1 ring-border [&::after]:rounded-r-sm! [&::before]:rounded-l-sm!"
>
<ColorSliderThumb
class="size-4 rounded-sm! border-2 border-background shadow-md ring-1 ring-black/10 dark:ring-white/20"
/>
</ColorSliderTrack>
</ColorSlider>
</template>