New UI Components

This commit is contained in:
2026-07-18 16:00:13 +05:30
parent d22824fa62
commit 95ca1c0625
75 changed files with 201 additions and 200 deletions
+1 -14
View File
@@ -1,14 +1 @@
// Checkbox with an inline label.
component Checkbox {
props {
name = ""
label = ""
class = ""
}
view {
<label class="wire-check {class}">
<input type="checkbox" name="{name}" class="wire-check__box">
<span class="wire-check__label"><slot>{label}</slot></span>
</label>
}
}
component Checkbox { props { id = "" name = "" label = "Checkbox" description = "" checked = false disabled = false } view { <label for="{id}" class="flex min-h-11 cursor-pointer items-start gap-3 rounded-xl p-2 transition hover:bg-slate-50 dark:hover:bg-slate-900"><input id="{id}" name="{name}" type="checkbox" checked="{checked}" disabled="{disabled}" class="mt-0.5 size-5 rounded border-slate-300 text-violet-600 focus:ring-violet-500 dark:border-slate-700 dark:bg-slate-950" /><span><span class="block text-sm font-semibold text-slate-900 dark:text-white">{label}</span><span data-show="description" class="mt-0.5 block text-sm text-slate-500 dark:text-slate-400">{description}</span></span></label> } }