Skip to content
项目

Konixy/better-svelte-email

在 GitHub 查看

关于

💌 Build your emails using Svelte and Tailwind

网站与应用开发

这些数字如何统计

可以做什么

  • Tailwind v4 Support - Transforms Tailwind classes to inline styles for email clients
  • Plain CSS Support - You can use plain CSS for your email styles, tailwind is optional
  • Email Preview via CLI - Visual email preview and test sending, just run npx @better-svelte-email/cli dev
  • TypeScript First - Fully typed with comprehensive type definitions

实测星标增长

24小时
0
7天
+1
15天
+2
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Better Svelte Email, the only way to build emails in Svelte

npm version GitHub stars npm downloads

Website · GitHub

Usage

See the documentation for a complete guide on how to use Better Svelte Email.

Features

  • Tailwind v4 Support - Transforms Tailwind classes to inline styles for email clients
  • Plain CSS Support - You can use plain CSS for your email styles, tailwind is optional
  • Email Preview via CLI - Visual email preview and test sending, just run npx @better-svelte-email/cli dev
  • TypeScript First - Fully typed with comprehensive type definitions
  • Well Tested - >90% test coverage with unit and integration tests
  • Minimal - Whole library is under 16k lines of code and ≈220kb uncompressed

Why?

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.

Minimum Svelte Version

The minimum supported Svelte version is 5.14.3. For older versions, you can use svelte-email-tailwind.

Supported Features

✅ Supported

  • 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
  • Custom CSS injection (for app theme integration)

Author

Anatole Dufour (@Konixy)

Author of svelte-email-tailwind

Steven Polak (@steveninety)

Authors of react-email

Bu Kinoshita (@bukinoshita)

Zeno Rocha (@zenorocha)

Development

Running Tests

bun run test

All tests must pass before pushing to main. The CI/CD pipeline will automatically run tests on every push and pull request.

Building

bun run build

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

To do so, you'll need to:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/amazing-feature)
  3. Make your changes
  4. Run tests (bun run test)
  5. Commit your changes using conventional commits:
    • feat: - New features
    • fix: - Bug fixes
    • docs: - Documentation changes
    • test: - Test additions/changes
    • chore: - Maintenance tasks
  6. Push to your branch (git push origin feat/amazing-feature)
  7. Open a Pull Request

Acknowledgements

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.

探索相关项目

加载中…