Component Library

Explore our comprehensive collection of interactive UI components. Each component is fully tested, accessible, and built with Svelte 5 runes for optimal performance.

4
Components
100%
Test Coverage
A11y
Accessible
TS
TypeScript

Calculator

Interactive calculator demonstrating Svelte 5 state management with reactive calculations and keyboard support.

Live Demo

0

Features

  • Reactive state with Svelte 5 runes
  • Mathematical operations (+, -, ×, ÷)
  • Clear and reset functionality
  • Responsive button layout

Usage

<script>
  import Calculator from './calculator.svelte';
  
  let result = 0;
  
  const handle_calculation = (event) => {
    result = event.detail.result;
  };
</script>

<Calculator on:calculate={handle_calculation} />
<p>Result: {result}</p>

Test Coverage

Comprehensive tests available in calculator.svelte.test.ts

Card

Flexible card component with multiple variants, clickable options, and customizable content areas.

Live Demo

Example Card

This is a subtitle

This is the main content of the card. You can customize all the props to see how it changes.

Features

  • Multiple visual variants
  • Clickable with hover effects
  • Image support
  • Flexible content areas
  • Keyboard accessible

Variants

Default
Elevated
Outlined
Filled

Usage

<script>
  import Card from './card.svelte';
  
  const handle_click = () => {
    console.log('Card clicked!');
  };
</script>

<Card clickable on:click={handle_click}>
  <h3>Interactive Card</h3>
  <p>Click me to see the interaction!</p>
</Card>

Login Form

Complex form component with real-time validation, password visibility toggle, and comprehensive accessibility features.

Live Demo

Password *
Don't have an account?

Demo Configuration

Features

  • Real-time email & password validation
  • Password visibility toggle
  • Remember me functionality
  • Forgot password handling
  • Loading states
  • Accessibility compliant

Validation Rules

Email: Valid email format required
Password: Minimum 8 characters, uppercase, lowercase, number

Usage

<script>
  import LoginForm from './login-form.svelte';
  
  const handle_submit = (event) => {
    const { email, password } = event.detail;
    console.log('Login attempt:', { email, password });
  };
</script>

<LoginForm on:submit={handle_submit} />

Component Overview

Quick reference for all available components with their key features and test coverage.

Calculator

Interactive calculator with state management using Svelte 5 runes

Key Features:

  • Reactive state
  • Mathematical operations
  • Clear functionality
View Demo
✓ Tested

Modal

Accessible modal with focus management and keyboard navigation

Key Features:

  • Focus management
  • Keyboard navigation
  • Backdrop click
View Demo
✓ Tested

Card

Flexible card component with multiple variants and slots

Key Features:

  • Multiple variants
  • Clickable option
  • Image support
View Demo
✓ Tested

Login Form

Complex form with validation, password toggle, and accessibility

Key Features:

  • Real-time validation
  • Password visibility toggle
  • Remember me
View Demo
✓ Tested