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 -11
View File
@@ -1,11 +1 @@
// Rounded user image.
component Avatar {
props {
src = ""
alt = ""
class = ""
}
view {
<img class="wire-avatar {class}" src="{src}" alt="{alt}">
}
}
component Avatar { props { src = "" alt = "" initials = "WR" size = "md" } view { <span class="inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-gradient-to-br from-violet-500 to-fuchsia-500 font-semibold text-white {size === 'sm' ? 'size-8 text-xs' : size === 'lg' ? 'size-14 text-base' : 'size-10 text-sm'}"><img data-show="src" src="{src}" alt="{alt}" class="h-full w-full object-cover" /><span data-show="!src" aria-hidden="true">{initials}</span></span> } }