Filters and joins class names, removing falsy values
Combines class names and resolves Tailwind conflicts
Create an action button group (view, edit, delete pattern)
Create alert HTML string
Create alert DOM element
Create an avatar element
Create an avatar group (stacked avatars)
Create avatar with name and metadata (e.g., for user lists)
Create a badge DOM element
Convenience function to create multiple badges
Create a badge with an icon
Create a card DOM element
Create a circular progress element
Create inline code HTML string
Create code block HTML string
Create a dot badge (status indicator)
Create dropdown HTML string
Create a search input with icon
Create a filter select dropdown
Create header HTML string
Convenience functions for common alert types
Create kbd HTML string
Create a full-container loading overlay
Create a progress bar element
Create keyboard shortcut HTML (multiple keys)
Create a simple progress bar without container
Create a single skeleton element
Create spinner HTML string using Phosphor Icons
Create a spinner with label
Create a stat card DOM element
Create a styled table element
Create a table wrapper div
Create a tabs component
& Omit<SkeletonProps, "variant">
Create a text skeleton (multiple lines)
Create a theme with a specific primary color
Create a toast element
Create a toggle switch element
Create a hidden checkbox input that syncs with a toggle Useful for form submissions
Dismiss all toasts
Get Tailwind classes for an alert
Get content wrapper classes
Get dismiss button classes
Get icon classes for an alert
Get title classes for alerts with titles
Get classes for avatar container
Get classes for avatar image
Get classes for initials avatar background
Get classes for placeholder avatar (no image, no name)
Get classes for status indicator
Get classes for initials text
Get Tailwind classes for a badge
Get classes for card body section
Get Tailwind classes for a card
Get classes for card header section
Get CSS for circular progress animation
Get Tailwind classes for code blocks
Get Tailwind classes for inline code
Generate a consistent color based on a string (for initials avatars)
Generate complete meta and link tags for favicons including theme color
Get classes for dropdown container
CSS required for dropdown functionality. Add this to your page's <style> or stylesheet.
Get classes for dropdown divider
Get classes for dropdown section header
Get classes for dropdown item
Get classes for dropdown trigger
Generate HTML link tags for favicons
Get the file paths for a favicon variant
Get the theme color for a favicon variant
Get classes for filter bar container
Get classes for filter labels
Get classes for search input container (includes icon)
Get classes for search icon
Get classes for search input field
Get classes for filter select/dropdown
Get header classes
Get CSS required for header functionality Includes dropdown CSS
Get initials from a name
Helper to get combined light+dark mode classes for interactive colors
Get Tailwind classes for keyboard shortcuts
Get logo as a data URI for use in img src attributes
Get neutral color classes that work in both light and dark mode
Helper to get combined light+dark mode classes for neutral colors
Get primary color classes that work in both light and dark mode
| "themeColor"
| "darkMode"
| "animated"
| "striped"
| "indeterminate"
Get classes for progress bar (fill)
Get classes for progress container (track)
Get CSS for striped and indeterminate animations
Get classes for a skeleton element
Get CSS for skeleton animations
Get just the icon spin class (for adding to existing icons)
Get spinner animation class
Get Tailwind classes for a spinner
Get CSS required for spinner animation. Add this to your page's <style> or stylesheet.
Get Tailwind classes for stat card container
Get Tailwind classes for stat card label
Get Tailwind classes for stat card value
Get status color classes that work in both light and dark mode
Helper to get combined light+dark mode classes for a status color
Get classes for individual tab button
Get classes for count badge within tab
Get classes for draft indicator
Get classes for tbody element
Get classes for td elements
Get classes for table element
Get all table classes as an object for easy destructuring
Get classes for th elements
Get classes for thead element
Get classes for tr elements
Get classes for a table wrapper/container
Get classes for tabs container
Get classes for toast action button
Get classes for toast element
Create or get toast container
Get classes for toast content
Get CSS for toast animations
Get classes for toast dismiss button
Get classes for toast icon
Get classes for toast message
Get classes for toast title
Get classes for toggle track (background)
Get CSS for toggle switches using hidden checkbox + label pattern.
Get classes for toggle description
Get classes for toggle label
Get classes for toggle thumb (the moving circle)
Get classes for toggle with label container
Get Tailwind classes for trend indicator
Convenience functions for common toast types
Alert props
-
class: string
Additional CSS classes
-
darkMode: boolean
Enable dark mode
-
dismissible: boolean
Whether the alert is dismissible
-
icon: string
Icon HTML or class
-
size: AlertSize
Alert size
-
title: string
Title text (optional, for prominent alerts)
-
variant: AlertVariant
Semantic variant
-
class: string
Additional classes
-
darkMode: boolean
Enable dark mode
-
max: number
Maximum avatars to show before "+N"
-
overlap: "sm" | "md" | "lg"
Overlap amount
-
size: AvatarSize
Size of avatars
-
alt: string
Alt text for image
-
class: string
Additional classes
-
darkMode: boolean
Enable dark mode
-
name: string
Name to generate initials from
-
shape: AvatarShape
Shape
-
size: AvatarSize
Size
-
src: string
Image source URL
-
status: AvatarStatus
Status indicator
-
themeColor: PrimaryColor
Theme color for initials background
-
class: string
Additional CSS classes to merge
-
darkMode: boolean
Enable dark mode support (default: true)
-
dot: boolean
Dot indicator (no text, just colored dot)
-
removable: boolean
Removable badge (shows X icon)
-
size: BadgeSize
Size of the badge
-
style: BadgeStyle
Visual style
-
themeColor: PrimaryColor
Custom theme color (for primary variant)
-
variant: BadgeVariant
Semantic variant determining color scheme
- class: string
-
darkMode: boolean
Enable dark mode support (default: true)
-
hoverable: boolean
Hover effect
-
interactive: boolean
Make card clickable/interactive
- padding: CardPadding
- variant: CardVariant
-
class: string
Additional classes
-
darkMode: boolean
Enable dark mode
-
indeterminate: boolean
Indeterminate state
-
showLabel: boolean
Show value in center
-
size: number
Size in pixels
-
strokeWidth: number
Stroke width
-
themeColor: PrimaryColor
Custom theme color
-
value: number
Progress value (0-100)
-
variant: ProgressVariant
Color variant
Code block props
-
class: string
Additional CSS classes
-
lineNumbers: boolean
Whether to show line numbers
-
maxHeight: string
Maximum height with scroll
Code props
-
class: string
Additional CSS classes
-
size: CodeSize
Code size
-
variant: CodeVariant
Code variant
Color scale definition for a single color
-
bg: string
Subtle background (50 weight)
-
bgSolid: string
Solid background (500-600 weight)
-
bgSolidActive: string
Active/pressed state
-
bgSolidHover: string
Hover state for solid bg
-
bgStrong: string
Slightly stronger background (100 weight)
- bgSubtle: string
- bgSubtleHover: string
-
border: string
Subtle border
-
ring: string
Ring for focus/outline
-
ringStrong: string
Strong ring
-
text: string
Primary text color on light bg
-
textColored: string
For ghost/outline variants
- textColoredHover: string
-
textOnSolid: string
Text color on solid backgrounds
Full dropdown configuration
-
items: DropdownItem[]
Menu items
-
trigger: string
HTML content for the trigger element
-
triggerClass: string
Trigger button additional classes
-
activeId: string
Currently active tab ID
-
items: TabItem[]
Tab items
-
onChange: (id: string) => void
Tab change handler
-
description: string
Description text below label
-
label: string
Label text
-
labelPosition: "left" | "right"
Label position
-
onChange: (checked: boolean) => void
Change handler
Dropdown menu item
-
class: string
Additional CSS classes
-
divider: boolean
Whether this item is a divider
-
header: string
Section header text (makes this a non-clickable header)
-
href: string
Item href (makes it a link)
-
icon: string
Icon HTML or class (e.g., '<i class="ph ph-user"></i>')
-
label: string
Item label text
-
onclick: string
onClick handler name (for JavaScript integration)
-
variant: DropdownItemVariant
Item variant for special styling
Dropdown props
-
align: DropdownAlign
Menu alignment
-
class: string
Additional CSS classes for the container
-
id: string
Unique identifier for the dropdown (used for CSS targeting)
-
menuClass: string
Additional CSS classes for the menu
-
variant: DropdownVariant
Dropdown variant
Favicon file paths for a variant
-
android192: string
192x192 PNG for Android Chrome
-
android512: string
512x512 PNG for PWA splash screens
-
appleTouchIcon: string
180x180 PNG for Apple Touch Icon
-
favicon16: string
16x16 PNG for browser tab
-
favicon32: string
32x32 PNG for browser tab (high DPI)
-
favicon48: string
48x48 PNG for Windows/shortcuts
-
manifest: string
Web manifest file
-
svg: string
Original SVG source
-
align: "left" | "center" | "right" | "between"
Alignment
- class: string
-
variant: "default" | "subtle" | "none"
Background style
- class: string
-
size: "sm" | "md"
Size variant
Header props
-
bgClass: string
Background color class (defaults to 'bg-slate-800')
-
class: string
Additional CSS classes for header
-
labels: { settings?: string; logout?: string; }
Custom labels
-
language: LanguageConfig
Language toggle
-
logo: LogoConfig
Logo configuration
-
logoutHref: string
Logout href for user dropdown
-
nav: NavLink[]
Navigation links
-
settingsHref: string
Settings href for user dropdown
-
switcher: SwitcherConfig
Additional switcher (e.g., client switcher)
-
user: UserConfig
User configuration (shows dropdown)
Language toggle config
-
current: "en" | "ja"
Current language
-
urlPattern: string
Base URL pattern (use {lang} placeholder)
Logo configuration
-
alt: string
Logo alt text
-
appName: string
App name to display next to logo
-
heightClass: string
Logo height class (defaults to 'h-10')
-
href: string
Logo link href (defaults to '/')
-
src: string
Logo image source
-
animated: boolean
Animated transition
-
class: string
Additional classes
-
darkMode: boolean
Enable dark mode support
-
indeterminate: boolean
Indeterminate state (animated, no specific value)
-
labelFormat: () => stringvalue: number,max: number
Custom label format
-
max: number
Maximum value (default: 100)
-
showLabel: boolean
Show value label
-
size: ProgressSize
Size of the progress bar
-
striped: boolean
Striped pattern
-
themeColor: PrimaryColor
Custom theme color (for primary variant)
-
value: number
Progress value (0-100)
-
variant: ProgressVariant
Color variant
-
animate: boolean
Animate the skeleton
-
animation: "pulse" | "wave" | "none"
Animation type
-
class: string
Additional classes
-
darkMode: boolean
Enable dark mode
-
height: string
Height (CSS value or Tailwind class)
-
variant: SkeletonVariant
Shape variant
-
width: string
Width (CSS value or Tailwind class)
Spinner props
-
class: string
Additional CSS classes
-
darkMode: boolean
Enable dark mode
-
size: SpinnerSize
Spinner size
-
speed: SpinnerSpeed
Animation speed
-
themeColor: PrimaryColor
Theme color (used when variant is 'primary')
-
variant: SpinnerVariant
Spinner variant
-
class: string
Additional classes
-
darkMode: boolean
Enable dark mode support
-
icon: string | HTMLElement
Optional icon (SVG string or element)
-
label: string
Label describing the metric
-
themeColor: PrimaryColor
Theme color for primary variant
-
trend: { direction: "up" | "down" | "neutral"; value: string; positive?: boolean; }
Trend indicator
-
value: string | number
The main metric value
-
variant: StatCardVariant
Color variant
Switcher config (e.g., client switcher)
-
icon: string
Icon HTML
-
items: DropdownItem[]
Dropdown items
-
label: string
Switcher label
-
selectedName: string
Currently selected item name
-
count: number
Optional count badge
-
disabled: boolean
Disabled state
-
draft: boolean
Draft/beta indicator
-
icon: string
Optional icon (SVG string)
-
id: string
Unique identifier
-
label: string
Display label
-
align: "left" | "center" | "right"
Cell alignment
- class: string
-
muted: boolean
Muted text color
-
nowrap: boolean
No wrap
-
primary: boolean
Primary/emphasized cell
-
truncate: boolean
Truncate with ellipsis
- class: string
-
sticky: boolean
Sticky header
-
bordered: boolean
Add outer border
- class: string
-
compact: boolean
Compact cell padding
-
fullWidth: boolean
Full width table
- class: string
-
clickable: boolean
Clickable row
-
hoverable: boolean
Enable hover highlighting
-
selected: boolean
Selected state
- class: string
-
rounded: boolean
Rounded corners with border
-
scrollable: boolean
Horizontal scroll on overflow
-
shadow: boolean
Add shadow
-
active: boolean
Active state
- class: string
-
darkMode: boolean
Enable dark mode
-
disabled: boolean
Disabled state
-
size: "sm" | "md" | "lg"
Size
-
themeColor: PrimaryColor
Theme color for active state
-
variant: TabsVariant
Tab variant (should match container)
- class: string
-
darkMode: boolean
Enable dark mode
-
fullWidth: boolean
Full width tabs
-
size: "sm" | "md" | "lg"
Size
-
themeColor: PrimaryColor
Theme color for active state
-
variant: TabsVariant
Visual style variant
Full theme definition
-
colorName: PrimaryColor
Color name for reference
-
primary: ColorScale
Primary brand color
-
primaryDark: ColorScale
Dark mode variants for primary
-
class: string
Additional classes
-
darkMode: boolean
Enable dark mode
-
position: ToastPosition
Position of toast container
-
action: { label: string; onClick: () => void; }
Action button
-
class: string
Additional classes
-
darkMode: boolean
Enable dark mode
-
dismissible: boolean
Dismissible
-
duration: number
Duration in ms (0 for no auto-dismiss)
-
icon: string | false
Icon (HTML string, false to hide, undefined for default)
-
message: string
Message content
-
onDismiss: () => void
Callback when toast is dismissed
-
title: string
Title (optional)
-
variant: ToastVariant
Variant
-
checked: boolean
Checked/on state
-
class: string
Additional classes
-
darkMode: boolean
Enable dark mode
-
disabled: boolean
Disabled state
-
id: string
ID attribute
-
name: string
Name attribute (for forms)
-
size: ToggleSize
Size
-
themeColor: PrimaryColor
Theme color when checked
User info for dropdown
-
email: string
User email
-
initials: string
Custom avatar initials
-
name: string
User display name
-
role: string
User role (optional)
Create a user dropdown for headers
-
email: string
User email
-
initials: string
Avatar initials (defaults to first 2 chars of name)
-
labels: { settings?: string; logout?: string; }
Custom labels
-
logoutHref: string
Logout href
-
name: string
User display name
-
settingsHref: string
Settings page href
Alert size
Alert variants - semantic meaning
| "primary"
| "success"
| "warning"
| "error"
| "info"
| "draft"
Badge variants map to semantic meaning, not colors. This allows the color palette to evolve independently.
Code size
Dropdown alignment
Item variant for special styling
Dropdown variants for styling context
Favicon size type
Available favicon color variants
| "symbol-light"
| "horizontal"
| "horizontal-light"
| "favicon"
| "mark"
| "mark-light"
| "wordmark"
| "wordmark-light"
Logo variant identifier for getLogoDataUri function
Spinner size
Spinner speed
Theme mode for light/dark styling
eSolia brand color palette
-
accent: string
eSolia accent orange/gold (#FFBC68)
-
primary: string
eSolia dark blue - primary brand color (#2D2F63)
-
secondary: string
Gray for secondary elements (#C8C8C8)
-
textDark: string
Text color for light backgrounds
-
textLight: string
Text color for dark backgrounds
-
white: string
White for light variants
Draft/WIP status (special case - orange/yellow tone)
Favicon SVG - simplified symbol for small sizes (16x16, 32x32)
Standard favicon sizes included in each variant
Theme colors for each variant (for meta theme-color tag)
List of all available favicon variants
Focus ring styles for accessibility Updated with dark mode support
Common icon SVGs (16x16 viewBox)
- check: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg>`
- eye: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" /><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" /></svg>`
- pencil: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" /></svg>`
- plus: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" /></svg>`
- trash: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" /></svg>`
- x: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" /></svg>`
Interactive/Primary colors for buttons and links Now with dark mode support
- danger: { bg: string; bgHover: string; bgActive: string; text: string; border: string; textColored: string; textColoredHover: string; bgSubtle: string; bgSubtleHover: string; bgDark: string; bgHoverDark: string; bgActiveDark: string; textColoredDark: string; textColoredHoverDark: string; bgSubtleDark: string; bgSubtleHoverDark: string; borderDark: string; }
- primary: { bg: string; bgHover: string; bgActive: string; text: string; border: string; textColored: string; textColoredHover: string; bgSubtle: string; bgSubtleHover: string; bgDark: string; bgHoverDark: string; bgActiveDark: string; textColoredDark: string; textColoredHoverDark: string; bgSubtleDark: string; bgSubtleHoverDark: string; borderDark: string; }
- secondary: { bg: string; bgHover: string; bgActive: string; text: string; border: string; bgDark: string; bgHoverDark: string; bgActiveDark: string; textDark: string; borderDark: string; }
- success: { bg: string; bgHover: string; bgActive: string; text: string; border: string; textColored: string; textColoredHover: string; bgSubtle: string; bgSubtleHover: string; bgDark: string; bgHoverDark: string; bgActiveDark: string; textColoredDark: string; textColoredHoverDark: string; bgSubtleDark: string; bgSubtleHoverDark: string; borderDark: string; }
Neutral colors for UI chrome, text, and backgrounds
- bgMuted: string
- bgMutedDual: string
- bgPage: string
- bgPageDual: string
- bgSubtle: string
- bgSubtleDual: string
- bgSurface: string
- bgSurfaceDual: string
- border: string
- borderDual: string
- borderStrong: string
- borderStrongDual: string
- borderSubtle: string
- borderSubtleDual: string
- dividerDual: string
- ring: string
- ringDual: string
- ringStrong: string
- ringStrongDual: string
- textBody: string
- textBodyDual: string
- textHeading: string
- textHeadingDual: string
- textMuted: string
- textMutedDual: string
- textSubtle: string
- textSubtleDual: string
Neutral colors with dark mode support
- dark: { bgPage: string; bgSurface: string; bgMuted: string; bgSubtle: string; textHeading: string; textBody: string; textMuted: string; textSubtle: string; border: string; borderStrong: string; borderSubtle: string; ring: string; ringStrong: string; divider: string; }
- light: { bgPage: string; bgSurface: string; bgMuted: string; bgSubtle: string; textHeading: string; textBody: string; textMuted: string; textSubtle: string; border: string; borderStrong: string; borderSubtle: string; ring: string; ringStrong: string; divider: string; }
Primary color definitions with light and dark mode variants
Status colors for badges, alerts, and status indicators Each status has light mode and dark mode variants
- error: { bg: string; bgStrong: string; bgSolid: string; text: string; textOnSolid: string; border: string; ring: string; ringStrong: string; bgDual: string; bgStrongDual: string; bgSolidDual: string; textDual: string; borderDual: string; ringDual: string; }
- info: { bg: string; bgStrong: string; bgSolid: string; text: string; textOnSolid: string; border: string; ring: string; ringStrong: string; bgDual: string; bgStrongDual: string; bgSolidDual: string; textDual: string; borderDual: string; ringDual: string; }
- success: { bg: string; bgStrong: string; bgSolid: string; text: string; textOnSolid: string; border: string; ring: string; ringStrong: string; bgDual: string; bgStrongDual: string; bgSolidDual: string; textDual: string; borderDual: string; ringDual: string; }
- warning: { bg: string; bgStrong: string; bgSolid: string; text: string; textOnSolid: string; border: string; ring: string; ringStrong: string; bgDual: string; bgStrongDual: string; bgSolidDual: string; textDual: string; borderDual: string; ringDual: string; }
Status colors with dark mode support
- error: { light: { bg: string; bgStrong: string; bgSolid: string; text: string; textOnSolid: string; border: string; ring: string; }; dark: { bg: string; bgStrong: string; bgSolid: string; text: string; textOnSolid: string; border: string; ring: string; }; }
- info: { light: { bg: string; bgStrong: string; bgSolid: string; text: string; textOnSolid: string; border: string; ring: string; }; dark: { bg: string; bgStrong: string; bgSolid: string; text: string; textOnSolid: string; border: string; ring: string; }; }
- success: { light: { bg: string; bgStrong: string; bgSolid: string; text: string; textOnSolid: string; border: string; ring: string; }; dark: { bg: string; bgStrong: string; bgSolid: string; text: string; textOnSolid: string; border: string; ring: string; }; }
- warning: { light: { bg: string; bgStrong: string; bgSolid: string; text: string; textOnSolid: string; border: string; ring: string; }; dark: { bg: string; bgStrong: string; bgSolid: string; text: string; textOnSolid: string; border: string; ring: string; }; }