Components

Form

Shadcn

Accessible form components built with Formsnap, Superforms, and Zod validation.

Dependencies

Form components require additional dependencies for validation and form handling.

Components

  • Form.Field - Wrapper for a single form field
  • Form.Control - The actual form control (input, select, etc.)
  • Form.Label - Accessible label for the field
  • Form.Description - Helper text for the field
  • Form.FieldErrors - Validation error messages
  • Form.Button - Submit button with loading state
  • Form.Fieldset - Group related fields
  • Form.Legend - Title for fieldset

Preview

Your email address

Usage

Validation

Form validation is handled by Zod schemas via sveltekit-superforms. The validation runs on both client and server.

  • ✓ Client-side validation with immediate feedback
  • ✓ Server-side validation for security
  • ✓ Accessible error messages
  • ✓ Custom error styling