Skip to content

Implement: Custom Spinner/Loading Component #120

@dokterbob

Description

@dokterbob

Objective

Create a custom spinner component to replace Flowbite Spinner.

Component Locations

  • SubmitButton.svelte - Loading state during submission
  • ChatWaiting.svelte - Loading indicator

Options

  1. Use Lucide icon with animation (e.g., Loader2)
  2. Create custom SVG spinner
  3. Use CSS-only spinner
  4. Find ShadCDN-compatible spinner package

Tasks

  • Research spinner implementation options
  • Create Spinner component in ui folder
  • Add size variants (sm, md, lg)
  • Implement animation with Tailwind
  • Replace Flowbite Spinner usage
  • Test performance

Implementation Example

<!-- Option 1: Lucide Icon -->
<script>
  import { Loader2 } from 'lucide-svelte';
</script>
<Loader2 class="animate-spin h-4 w-4" />

<!-- Option 2: Custom Component -->
<Spinner size="sm" class="text-primary" />

Acceptance Criteria

  • Smooth animation
  • Customizable size and color
  • Low performance impact
  • Works in all browsers

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions