Crate leptos_shadcn_ui

Crate leptos_shadcn_ui 

Source
Expand description

§Leptos ShadCN UI

A comprehensive collection of beautiful, accessible UI components built for Leptos v0.8+, inspired by shadcn/ui.

§Features

  • 25+ Components: Button, Input, Card, Alert, and many more
  • Leptos 0.8+: Built specifically for Leptos v0.8+ compatibility
  • Accessibility First: All components follow accessibility best practices
  • Tailwind CSS: Seamless integration with Tailwind CSS
  • Type Safety: Full Rust type safety with proper error handling

§Usage

See the README.md for complete installation and usage instructions.

Note: Make sure to enable the features for the components you want to use:

[dependencies]
leptos-shadcn-ui = { path = "path/to/leptos-shadcn-ui/packages/leptos-shadcn-ui", features = ["button", "input", "card"] }

§Components

§Form Components

  • Button, Input, Label, Checkbox, Switch, Radio Group, Select, Textarea

§Layout Components

  • Card, Separator, Tabs, Accordion, Dialog, Popover, Tooltip

§Feedback & Status

  • Alert, Badge, Skeleton, Progress, Toast, Table, Calendar, Date Picker, Pagination

§Interactive Components

  • Slider, Toggle

§Performance Monitoring

  • Performance Audit System - Comprehensive performance monitoring and optimization
  • Bundle Size Analysis - Component size tracking and optimization recommendations
  • Real-time Monitoring - Performance metrics collection and analysis
  • CLI Tool - Command-line interface for running audits and generating reports

§License

MIT License - see the LICENSE file for details.

Modules§

prelude
Leptos ShadCN UI Prelude

Macros§

tw_merge
Merges all the Tailwind classes, resolving conflicts.

Structs§

AccordionContentProps
Props for the AccordionContent component.
AccordionItemProps
Props for the AccordionItem component.
AccordionProps
Props for the Accordion component.
AccordionTriggerChildProps
AccordionTriggerProps
Props for the AccordionTrigger component.
AlertDescriptionProps
Props for the AlertDescription component.
AlertProps
Props for the Alert component.
AlertTitleProps
Props for the AlertTitle component.
BadgeProps
Props for the Badge component.
BreadcrumbEllipsisProps
Props for the BreadcrumbEllipsis component.
BreadcrumbItemProps
Props for the BreadcrumbItem component.
BreadcrumbLinkProps
Props for the BreadcrumbLink component.
BreadcrumbListProps
Props for the BreadcrumbList component.
BreadcrumbPageProps
Props for the BreadcrumbPage component.
BreadcrumbProps
Props for the Breadcrumb component.
BreadcrumbSeparatorProps
Props for the BreadcrumbSeparator component.
BundleAnalysis
Bundle analysis results
BundleAnalyzer
Component bundle analyzer for optimization
ButtonChildProps
Props for child components when using as_child
ButtonProps
Props for the Button component.
CalendarDate
CalendarProps
Props for the Calendar component.
CardContentProps
Props for the CardContent component.
CardDescriptionProps
Props for the CardDescription component.
CardFooterProps
Props for the CardFooter component.
CardHeaderProps
Props for the CardHeader component.
CardProps
Props for the Card component.
CardTitleProps
Props for the CardTitle component.
CheckboxProps
Props for the Checkbox component.
ComboboxOption
Props for a combobox option
ComboboxProps
Props for the Combobox component.
CommandEmptyProps
Props for the CommandEmpty component.
CommandGroupProps
Props for the CommandGroup component.
CommandInputProps
Props for the CommandInput component.
CommandItemProps
Props for the CommandItem component.
CommandListProps
Props for the CommandList component.
CommandProps
Props for the Command component.
CommandSeparatorProps
Props for the CommandSeparator component.
CommandShortcutProps
Props for the CommandShortcut component.
DatePickerProps
Props for the DatePicker component.
DatePickerWithRangeProps
Props for the DatePickerWithRange component.
DialogCloseProps
Props for the DialogClose component.
DialogContentProps
Props for the DialogContent component.
DialogContextValue
DialogDescriptionProps
Props for the DialogDescription component.
DialogFooterProps
Props for the DialogFooter component.
DialogHeaderProps
Props for the DialogHeader component.
DialogProps
Props for the Dialog component.
DialogTitleProps
Props for the DialogTitle component.
DialogTriggerChildProps
DialogTriggerProps
Props for the DialogTrigger component.
EnhancedBreadcrumbProps
Props for the EnhancedBreadcrumb component.
EnhancedCalendarProps
Props for the EnhancedCalendar component.
EnhancedCommandProps
Props for the EnhancedCommand component.
EnhancedDatePickerProps
Props for the EnhancedDatePicker component.
EnhancedInputOtpProps
Props for the EnhancedInputOtp component.
EnhancedPaginationProps
Props for the EnhancedPagination component.
ErrorBoundaryProps
Props for the ErrorBoundary component.
ErrorFallbackProps
Props for the ErrorFallback component.
ErrorInfo
Simple error information for production use
FormControlProps
Props for the FormControl component.
FormData
Form data structure for handling form submissions
FormDescriptionProps
Props for the FormDescription component.
FormError
Form validation error
FormFieldProps
Props for the FormField component.
FormItemProps
Props for the FormItem component.
FormLabelProps
Props for the FormLabel component.
FormMessageProps
Props for the FormMessage component.
FormProps
Props for the Form component.
FormValidation
Form validation result
InputOtpProps
Props for the InputOtp component.
InputProps
Props for the Input component.
LabelProps
Props for the Label component.
LazyComponentLoader
Lazy component loader that manages dynamic imports
LazyComponentProps
Props for the LazyComponent component.
PaginationContentProps
Props for the PaginationContent component.
PaginationEllipsisProps
Props for the PaginationEllipsis component.
PaginationItemProps
Props for the PaginationItem component.
PaginationLinkProps
Props for the PaginationLink component.
PaginationNextProps
Props for the PaginationNext component.
PaginationPreviousProps
Props for the PaginationPrevious component.
PaginationProps
Props for the Pagination component.
PopoverProps
Props for the Popover component.
ProgressContextValue
ProgressIndicatorProps
Props for the ProgressIndicator component.
ProgressLabelProps
Props for the ProgressLabel component.
ProgressProps
Props for the Progress component.
ProgressRootProps
Props for the ProgressRoot component.
RadioGroupItemProps
Props for the RadioGroupItem component.
RadioGroupProps
Props for the RadioGroup component.
RangeSliderProps
Props for the RangeSlider component.
SelectContentProps
Props for the SelectContent component.
SelectContextValue
SelectGroupProps
Props for the SelectGroup component.
SelectItemProps
Props for the SelectItem component.
SelectLabelProps
Props for the SelectLabel component.
SelectProps
Props for the Select component.
SelectSeparatorProps
Props for the SelectSeparator component.
SelectTriggerChildProps
SelectTriggerProps
Props for the SelectTrigger component.
SelectValueProps
Props for the SelectValue component.
SeparatorProps
Props for the Separator component.
SignalManagedBreadcrumbProps
Props for the SignalManagedBreadcrumb component.
SignalManagedBreadcrumbState
Signal-managed breadcrumb state
SignalManagedCalendarProps
Props for the SignalManagedCalendar component.
SignalManagedCalendarState
Signal-managed calendar state
SignalManagedCommandProps
Props for the SignalManagedCommand component.
SignalManagedCommandState
Signal-managed command state
SignalManagedDatePickerProps
Props for the SignalManagedDatePicker component.
SignalManagedDatePickerState
Signal-managed date-picker state
SignalManagedInputOtpProps
Props for the SignalManagedInputOtp component.
SignalManagedInputOtpState
Signal-managed input-otp state
SignalManagedPaginationProps
Props for the SignalManagedPagination component.
SignalManagedPaginationState
Signal-managed pagination state
SkeletonAvatarProps
Props for the SkeletonAvatar component.
SkeletonCardProps
Props for the SkeletonCard component.
SkeletonProps
Props for the Skeleton component.
SkeletonTextProps
Props for the SkeletonText component.
SliderContextValue
SliderProps
Props for the Slider component.
SliderRootProps
Props for the SliderRoot component.
SwitchContextValue
SwitchLabelProps
Props for the SwitchLabel component.
SwitchProps
Props for the Switch component.
SwitchRootProps
Props for the SwitchRoot component.
SwitchThumbProps
Props for the SwitchThumb component.
TableProps
Props for the Table component.
TabsContentProps
Props for the TabsContent component.
TabsContextValue
TabsListProps
Props for the TabsList component.
TabsProps
Props for the Tabs component.
TabsTriggerChildProps
TabsTriggerProps
Props for the TabsTrigger component.
TextareaProps
Props for the Textarea component.
ToastProps
Props for the Toast component.
ToggleProps
Props for the Toggle component.
TooltipContentChildProps
TooltipContentClass
TooltipContentClassBuilder
TooltipContentProps
Props for the TooltipContent component.
TooltipProps
Props for the Tooltip component.
TooltipProviderProps
Props for the TooltipProvider component.
TooltipTriggerChildProps
TooltipTriggerProps
Props for the TooltipTrigger component.

Enums§

AccordionOrientation
AccordionType
AlertVariant
Alert variant types
BadgeVariant
Badge variant types
ButtonSize
Button size types
ButtonVariant
Button variant types
ProgressVariant
SkeletonSize
SkeletonVariant
SliderSize
SliderVariant
SwitchSize
SwitchVariant
TooltipSide
TooltipVariant

Constants§

ALERT_CLASS
ALERT_DESCRIPTION_CLASS
ALERT_TITLE_CLASS
BADGE_CLASS
BUTTON_CLASS
CARD_CLASS
CARD_CONTENT_CLASS
CARD_DESCRIPTION_CLASS
CARD_FOOTER_CLASS
CARD_HEADER_CLASS
CARD_TITLE_CLASS
CHECKBOX_CLASS
INPUT_CLASS
INPUT_ERROR_CLASS
LABEL_CLASS
PROGRESS_CLASS
PROGRESS_INDICATOR_CLASS
SEPARATOR_CLASS
SKELETON_CLASS

Functions§

Accordion
Optional Props
AccordionContent
Optional Props
AccordionItem
Required Props
AccordionTrigger
Optional Props
Alert
Optional Props
AlertDescription
Optional Props
AlertTitle
Optional Props
Badge
Optional Props
Breadcrumb
Required Props
BreadcrumbEllipsis
Optional Props
BreadcrumbItem
Required Props
BreadcrumbLink
Required Props
BreadcrumbList
Required Props
BreadcrumbPage
Required Props
BreadcrumbSeparator
Optional Props
Button
Optional Props
Calendar
Optional Props
Card
Optional Props
CardContent
Optional Props
CardDescription
Optional Props
CardFooter
Optional Props
CardHeader
Optional Props
CardTitle
Optional Props
Checkbox
Optional Props
Combobox
Default theme Combobox component
Command
Required Props
CommandEmpty
Required Props
CommandGroup
Required Props
CommandInput
Optional Props
CommandItem
Required Props
CommandList
Required Props
CommandSeparator
Optional Props
CommandShortcut
Required Props
DatePicker
Optional Props
DatePickerWithRange
Optional Props
Dialog
Optional Props
DialogClose
Optional Props
DialogContent
Optional Props
DialogDescription
Optional Props
DialogFooter
Optional Props
DialogHeader
Optional Props
DialogTitle
Optional Props
DialogTrigger
Optional Props
EnhancedBreadcrumb
Enhanced breadcrumb component with advanced signal management
EnhancedCalendar
Enhanced calendar component with advanced signal management
EnhancedCommand
Enhanced command component with advanced signal management
EnhancedDatePicker
Enhanced date-picker component with advanced signal management
EnhancedInputOtp
Enhanced input-otp component with advanced signal management
EnhancedPagination
Enhanced pagination component with advanced signal management
ErrorBoundary
Simple error boundary wrapper
ErrorFallback
Simple error fallback component
Form
Default theme Form component
FormControl
Form control wrapper component
FormDescription
Form description component
FormField
Form field wrapper component
FormItem
Form item wrapper component
FormLabel
Form label component
FormMessage
Form message component for displaying validation errors
Input
Optional Props
InputOtp
Optional Props
Label
Optional Props
LazyComponent
Lazy component wrapper that loads components on demand
Pagination
Optional Props
PaginationContent
Required Props
PaginationEllipsis
Optional Props
PaginationItem
Required Props
PaginationLink
Required Props
PaginationNext
Optional Props
PaginationPrevious
Optional Props
Popover
Optional Props
Progress
Optional Props
ProgressIndicator
Optional Props
ProgressLabel
Optional Props
ProgressRoot
Optional Props
RadioGroup
Optional Props
RadioGroupItem
Required Props
RangeSlider
Optional Props
Select
Optional Props
SelectContent
Optional Props
SelectGroup
Optional Props
SelectItem
Required Props
SelectLabel
Optional Props
SelectSeparator
Optional Props
SelectTrigger
Optional Props
SelectValue
Optional Props
Separator
Optional Props
SignalManagedBreadcrumb
Signal-managed breadcrumb component
SignalManagedCalendar
Signal-managed calendar component
SignalManagedCommand
Signal-managed command component
SignalManagedDatePicker
Signal-managed date-picker component
SignalManagedInputOtp
Signal-managed input-otp component
SignalManagedPagination
Signal-managed pagination component
Skeleton
Optional Props
SkeletonAvatar
Optional Props
SkeletonCard
Optional Props
SkeletonText
Optional Props
Slider
Optional Props
SliderRoot
Optional Props
Switch
Optional Props
SwitchLabel
Optional Props
SwitchRoot
Optional Props
SwitchThumb
Optional Props
Table
Optional Props
Tabs
Optional Props
TabsContent
Required Props
TabsList
Optional Props
TabsTrigger
Required Props
Textarea
Optional Props
Toast
Optional Props
Toggle
Optional Props
Tooltip
Optional Props
TooltipContent
Optional Props
TooltipProvider
Optional Props
TooltipTrigger
Optional Props
create_user_error
Utility function to create user-friendly error messages
handle_error
Utility function to handle errors gracefully
use_error_handler
Hook for manual error handling
use_lazy_component
Hook for lazy loading components

Type Aliases§

ComponentLoader
Component loader function type