### SvelteKit Integration Example for Image Uploader
Source: https://context7.com/cheveniko/svelte-image-uploader/llms.txt
Demonstrates how to integrate the ImageUploader component into a SvelteKit page. It imports the component and places it within the main content area of the page, styled with Tailwind CSS. This example showcases the basic usage of the component.
```svelte
Svelte Image Uploader
Image uploader component with validation built in
```
--------------------------------
### Initialize Image Uploader Component
Source: https://context7.com/cheveniko/svelte-image-uploader/llms.txt
Main Svelte component that handles image upload workflow including drag-and-drop, file validation, preview generation, and form submission. Requires SvelteKit environment with shadcn-svelte, superforms, zod, and svelte-file-dropzone dependencies.
```svelte
```
--------------------------------
### Svelte Image Uploader Package Dependencies
Source: https://context7.com/cheveniko/svelte-image-uploader/llms.txt
Lists the core dependencies required for the Svelte Image Uploader, including svelte-file-dropzone for drag-and-drop functionality, lucide-svelte for icons, and @vercel/analytics for usage tracking. It also includes development dependencies like @sveltejs/kit and Tailwind CSS.
```json
{
"dependencies": {
"svelte-file-dropzone": "^2.0.9",
"lucide-svelte": "^0.511.0",
"@vercel/analytics": "^1.5.0"
},
"devDependencies": {
"@sveltejs/kit": "^2.16.0",
"svelte": "^5.0.0",
"tailwindcss": "^4.0.0",
"bits-ui": "^2.4.1",
"formsnap": "^2.0.1",
"sveltekit-superforms": "^2.25.0",
"svelte-sonner": "^1.0.4",
"zod": "^3.25.46"
}
}
```
--------------------------------
### shadcn-svelte Configuration for SvelteKit
Source: https://context7.com/cheveniko/svelte-image-uploader/llms.txt
Defines the configuration for shadcn-svelte components, specifying Tailwind CSS paths, color themes, component aliases, and TypeScript usage. This enables CLI-based component management and ensures a standardized component structure within the SvelteKit project.
```json
{
"$schema": "https://next.shadcn-svelte.com/schema.json",
"tailwind": {
"css": "src/app.css",
"baseColor": "slate"
},
"aliases": {
"components": "$lib/components",
"utils": "$lib/utils",
"ui": "$lib/components/ui",
"hooks": "$lib/hooks",
"lib": "$lib"
},
"typescript": true,
"registry": "https://next.shadcn-svelte.com/registry"
}
```
--------------------------------
### Spinner Component Usage in Svelte
Source: https://context7.com/cheveniko/svelte-image-uploader/llms.txt
Demonstrates usage of a simple SVG-based loading spinner component for indicating processing states, customizable with Tailwind CSS classes. It integrates into forms or buttons to show loading during operations like file uploads; the component itself is typically defined separately with TypeScript support. Dependencies include lucide-svelte or similar for icons if customized; limitations include reliance on CSS animations and static SVG structure for basic use cases.
```svelte
```
--------------------------------
### Complete Image Upload Form in Svelte
Source: https://context7.com/cheveniko/svelte-image-uploader/llms.txt
Implements a full image upload form with drag-and-drop functionality, file validation using Zod schema, and integration with shadcn-svelte Form components and sveltekit-superforms for state management. The form accepts JPEG and PNG files under 5MB, displays previews and error messages, and handles submissions with loading states. It depends on libraries like svelte-file-dropzone, svelte-sonner for toasts, and lucide-svelte for icons; limitations include SPA mode for updates and fixed file type/size constraints.
```svelte