Skip to main content

Crate leptos_shadcn_ui_wasm

Crate leptos_shadcn_ui_wasm 

Source
Expand description

§Leptos ShadCN UI - WASM Optimized

A WASM-optimized version of ShadCN UI components for Leptos 0.8+ with minimal dependencies. This package is specifically designed for WebAssembly environments and excludes dependencies that are not WASM-compatible.

§Features

  • 🚀 WASM-Optimized: Minimal dependencies, fast compilation
  • 📦 Small Bundle Size: Optimized for web deployment
  • 🎯 50+ Components: Complete ShadCN UI component library
  • 🔧 Easy Integration: Simple API, works with existing Leptos apps
  • âš¡ Feature Flags: Include only the components you need

§Usage

[dependencies]
leptos-shadcn-ui-wasm = "0.2"
use leptos::prelude::*;
use leptos_shadcn_ui_wasm::prelude::*;

#[component]
pub fn App() -> impl IntoView {
    view! {
        <div class="p-4">
            <Button>"Click me"</Button>
            <Input placeholder="Enter text..." />
        </div>
    }
}

Modules§

bundle_utils
Bundle size optimization utilities Utilities for optimizing bundle size in WASM
prelude
Convenience module for easy imports Re-exports all available components and utilities
validation
Input validation system for TDD implementation
wasm_utils
WASM-specific utilities and helpers Utilities specifically designed for WASM environments

Structs§

BundleInfo
Bundle information structure
ButtonChildProps
Props for child components when using as_child
ButtonChildPropsNewYork
Props for child components when using as_child
EnhancedAlertDialogProps
Props for the EnhancedAlertDialog component.
EnhancedAlertProps
Props for the EnhancedAlert component.
EnhancedAvatarProps
Props for the EnhancedAvatar component.
EnhancedBadgeProps
Props for the EnhancedBadge component.
EnhancedLabelProps
Props for the EnhancedLabel component.
EnhancedSeparatorProps
Props for the EnhancedSeparator component.
EnhancedSkeletonProps
Props for the EnhancedSkeleton component.
InputValidator
Input validator that applies multiple validation rules
SignalManagedAlertDialogProps
Props for the SignalManagedAlertDialog component.
SignalManagedAlertDialogState
Signal-managed alert-dialog state
SignalManagedAlertProps
Props for the SignalManagedAlert component.
SignalManagedAlertState
Signal-managed alert state
SignalManagedAvatarProps
Props for the SignalManagedAvatar component.
SignalManagedAvatarState
Signal-managed avatar state
SignalManagedBadgeProps
Props for the SignalManagedBadge component.
SignalManagedBadgeState
Signal-managed badge state
SignalManagedButtonChildProps
Props for child components when using as_child
SignalManagedButtonState
Signal-managed button state
SignalManagedCardState
Signal-managed card state
SignalManagedInputState
Signal-managed input state
SignalManagedLabelProps
Props for the SignalManagedLabel component.
SignalManagedLabelState
Signal-managed label state
SignalManagedSeparatorProps
Props for the SignalManagedSeparator component.
SignalManagedSeparatorState
Signal-managed separator state
SignalManagedSkeletonProps
Props for the SignalManagedSkeleton component.
SignalManagedSkeletonState
Signal-managed skeleton state
ValidationContext
Validation context for managing multiple field validations
ValidationError
Validation error with field name and message
ValidationResult
Validation result containing errors and overall validity

Enums§

AlertVariant
Alert variant types
AlertVariantNewYork
Alert variant types
BadgeVariant
Badge variant types
BadgeVariantNewYork
Badge variant types
ButtonSize
Button size types
ButtonSizeNewYork
Button size types
ButtonVariant
Button variant types
ButtonVariantNewYork
Button variant types
SkeletonSize
SkeletonSizeNewYork
SkeletonVariant
SkeletonVariantNewYork
ValidationRule
Validation rule types for different input validation scenarios

Functions§

Alert
Optional Props
AlertDescription
Optional Props
AlertDescriptionNewYork
Optional Props
AlertDialog
Required Props
AlertDialogAction
Optional Props
AlertDialogActionNewYork
Optional Props
AlertDialogCancel
Optional Props
AlertDialogCancelNewYork
Optional Props
AlertDialogContent
Optional Props
AlertDialogContentNewYork
Optional Props
AlertDialogDescription
Optional Props
AlertDialogDescriptionNewYork
Optional Props
AlertDialogFooter
Optional Props
AlertDialogFooterNewYork
Optional Props
AlertDialogHeader
Optional Props
AlertDialogHeaderNewYork
Optional Props
AlertDialogNewYork
Required Props
AlertDialogOverlay
Optional Props
AlertDialogOverlayNewYork
Optional Props
AlertDialogTitle
Optional Props
AlertDialogTitleNewYork
Optional Props
AlertDialogTrigger
Optional Props
AlertDialogTriggerNewYork
Optional Props
AlertNewYork
Optional Props
AlertTitle
Optional Props
AlertTitleNewYork
Optional Props
Avatar
Optional Props
AvatarFallback
Optional Props
AvatarFallbackNewYork
Optional Props
AvatarGroup
Optional Props
AvatarGroupNewYork
Optional Props
AvatarImage
Required Props
AvatarImageNewYork
Required Props
AvatarNewYork
Optional Props
Badge
Optional Props
BadgeNewYork
Optional Props
Button
Optional Props
ButtonNewYork
Optional Props
Card
Optional Props
CardContent
Optional Props
CardContentNewYork
Optional Props
CardDescription
Optional Props
CardDescriptionNewYork
Optional Props
CardFooter
Optional Props
CardFooterNewYork
Optional Props
CardHeader
Optional Props
CardHeaderNewYork
Optional Props
CardNewYork
Optional Props
CardTitle
Optional Props
CardTitleNewYork
Optional Props
EnhancedAlert
Enhanced alert component with advanced signal management
EnhancedAlertDialog
Enhanced alert-dialog component with advanced signal management
EnhancedAvatar
Enhanced avatar component with advanced signal management
EnhancedBadge
Enhanced badge component with advanced signal management
EnhancedButton
Enhanced Button component with signal management and performance monitoring
EnhancedCard
Enhanced Card component with advanced signal management
EnhancedInput
Enhanced Input component with advanced signal management
EnhancedLabel
Enhanced label component with advanced signal management
EnhancedSeparator
Enhanced separator component with advanced signal management
EnhancedSkeleton
Enhanced skeleton component with advanced signal management
Input
Optional Props
InputNewYork
Optional Props
Label
Optional Props
LabelNewYork
Optional Props
Separator
Optional Props
SeparatorNewYork
Optional Props
SignalManagedAlert
Signal-managed alert component
SignalManagedAlertDialog
Signal-managed alert-dialog component
SignalManagedAvatar
Signal-managed avatar component
SignalManagedBadge
Signal-managed badge component
SignalManagedButton
Signal-managed Button component with advanced memory management and lifecycle optimization
SignalManagedCard
Signal-managed Card component
SignalManagedCardContent
Signal-managed CardContent component
SignalManagedCardDescription
Signal-managed CardDescription component
SignalManagedCardFooter
Signal-managed CardFooter component
SignalManagedCardHeader
Signal-managed CardHeader component
SignalManagedCardTitle
Signal-managed CardTitle component
SignalManagedInput
Signal-managed Input component
SignalManagedLabel
Signal-managed label component
SignalManagedSeparator
Signal-managed separator component
SignalManagedSkeleton
Signal-managed skeleton component
Skeleton
Optional Props
SkeletonAvatar
Optional Props
SkeletonAvatarNewYork
Optional Props
SkeletonCard
Optional Props
SkeletonCardNewYork
Optional Props
SkeletonNewYork
Optional Props
SkeletonText
Optional Props
SkeletonTextNewYork
Optional Props