Create beautiful emails in Svelte with first-class Tailwind support
See the documentation for a complete guide on how to use Better Svelte Email.
- Tailwind v4 Support - Transforms Tailwind classes to inline styles for email clients
- Built-in Email Preview - Visual email preview and test sending
- TypeScript First - Fully typed with comprehensive type definitions
- Well Tested - Extensive test coverage with unit and integration tests
See Roadmap for future features and planned improvements.
Existing Svelte email solutions have significant limitations:
- svelte-email hasn't been updated in over 2 years
- svelte-email-tailwind suffers from stability issues and maintaining it is not sustainable anymore
Better Svelte Email is a complete rewrite of svelte-email-tailwind inspired by React Email, providing the rock-solid foundation your email infrastructure needs. It brings the simplicity, reliability, and feature richness of React Email to the Svelte ecosystem.
The minimum supported Svelte version is 5.14.3.
For older versions, you can use svelte-email-tailwind.
- All tailwindcss v4 utilities
- Custom Tailwind classes (
bg-[#fff],my:[40px], ...) - Dynamic Tailwind classes (
class={someVar}) - Responsive breakpoints (
sm:,md:,lg:,xl:,2xl:) - HTML elements and Svelte components
- Nested components
- All svelte features such as each blocks (
{#each}) and if blocks ({#if}), and more - Custom Tailwind configurations
Anatole Dufour (@Konixy)
Steven Polak (@steveninety)
Bu Kinoshita (@bukinoshita)
Zeno Rocha (@zenorocha)
bun run testAll tests must pass before pushing to main. The CI/CD pipeline will automatically run tests on every push and pull request.
bun run buildContributions are welcome! Please feel free to submit a Pull Request.
To do so, you'll need to:
- Fork the repository
- Create a feature branch (
git checkout -b feat/amazing-feature) - Make your changes
- Run tests (
bun run test) - Commit your changes using conventional commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changestest:- Test additions/changeschore:- Maintenance tasks
- Push to your branch (
git push origin feat/amazing-feature) - Open a Pull Request
Many components and logic were inspired by or adapted from svelte-email-tailwind and react-email. Huge thanks to the authors and contributors of these projects for their excellent work.