Skip to content

[RFC] Add Svelte support to Amplify UI #6624

@northprint

Description

@northprint

On which framework/platform would you like to see this feature implemented?

Other

Which UI component is this feature-request for?

Authenticator

Please describe your feature-request in detail.

Description

I would like to propose adding Svelte support to Amplify UI, starting with the Authenticator component. I have a working implementation ready and would appreciate feedback before submitting a PR.

Motivation

  • Svelte is growing rapidly in popularity (70k+ GitHub stars)
  • Many developers have requested Svelte support for Amplify UI
  • Would provide feature parity with React, Vue, and Angular implementations

Proposed Solution

I've implemented a complete Svelte package (@aws-amplify/ui-svelte) that includes:

  • ✅ Full Authenticator component with all auth flows
  • ✅ XState integration using existing state machines
  • ✅ TypeScript support
  • ✅ 95%+ test coverage
  • ✅ E2E tests
  • ✅ Theme system integration

Technical Details

  • Uses xstate@4.33.6 (same as other frameworks)
  • Follows existing component architecture
  • Implements Svelte-native patterns (stores, slot props)
  • Includes comprehensive test suite

Usage Example

<script>
  import { Authenticator } from '@aws-amplify/ui-svelte';
</script>

<Authenticator let:user let:signOut>
  <h2>Welcome {user.username}!</h2>
  <button on:click={signOut}>Sign Out</button>
</Authenticator>

Questions

  1. Would you be open to accepting Svelte support for Amplify UI?
  2. Any concerns about using XState v4 for consistency with other frameworks?
  3. Preferred approach for the PR - single comprehensive PR or split into smaller ones?

Additional Context

  • Implementation is complete on branch svelte/authenticator
  • All components, tests, and docs are ready
  • CI/CD workflows have been updated
  • Happy to make any adjustments based on feedback

Would love to hear your thoughts on this proposal. Thank you!

Please describe a solution you'd like.

https://github.com/northprint/amplify-ui/tree/svelte/authenticator
https://github.com/northprint/amplify-ui/tree/svelte/authenticator/packages/svelte

We love contributors! Is this something you'd be interested in working on?

  • 👋 I may be able to implement this feature request.
  • ⚠️ This feature might incur a breaking change.

Metadata

Metadata

Assignees

Labels

AuthenticatorAn issue or a feature-request for an Authenticator UI ComponentSveltehttps://svelte.dev/ - An issue or a feature-request for Sveltefeature-requestRequest a new feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions