Gathering detailed insights and metrics for @responsive-email/jsx-email
Gathering detailed insights and metrics for @responsive-email/jsx-email
a utility for writing responsive email templates for jsx-email and react-email
npm install @responsive-email/jsx-email
Typescript
Module System
Node Version
NPM Version
30.9
Supply Chain
57.7
Quality
74.3
Maintenance
50
Vulnerability
94.6
License
TypeScript (100%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
566
Last Day
1
Last Week
2
Last Month
22
Last Year
566
30 Stars
73 Commits
3 Forks
1 Watchers
2 Branches
3 Contributors
Updated on Feb 11, 2025
Latest Version
0.0.4
Package Id
@responsive-email/jsx-email@0.0.4
Unpacked Size
25.86 kB
Size
6.41 kB
File Count
25
NPM Version
10.8.1
Node Version
20.16.0
Published on
Jan 10, 2025
Cumulative downloads
Total Downloads
Last Day
-50%
1
Compared to previous day
Last Week
-66.7%
2
Compared to previous week
Last Month
-75.8%
22
Compared to previous month
Last Year
0%
566
Compared to previous year
1
1
4
responsive-email
is a framework-agnostic set of utility components that allow to build
responsive email templates with the best support possible. It does not make use of
media queries nor other unsupported ways of doing responsiveness on emails.
1npm install @responsive-email/jsx-email
<ResponsiveRow>
and <ResponsiveColumn>
1<ResponsiveRow> 2 <ResponsiveColumn span={1}>First</ResponsiveColumn> 3 <ResponsiveColumn span={2}>Second</ResponsiveColumn> 4 <ResponsiveColumn span={1}>Third</ResponsiveColumn> 5</ResponsiveRow>
These two components are only meant to be used in unison as shown in the above example.
The <ResponsiveRow>
will divide its maxWidth
(which is 600 by default) into the amount
of columns you pass onto it. It does this by detecting which one of the children are actually
an instance of <ResponsiveColumn>
based on the fact that all React elements are actually objects
under the hood that, if they represent a Function Component instance, have their props exposed and easy to access.
The <ResponsiveColumn>
by itself only renders a Fragment as it is meant to only be rendered
inside the <ResponsiveRow>
. The span
property allows the user to increase the size of a certain
column so that its width can be the sum of the respective amount of columns specified in span
, e.g.
span={2}
will result into a column that has a width of two columns.
The <ResponsiveRow>
will also log a warning if it finds you are using more than three columns,
as is best practice to use only three columns on email templates.
Each column will wrap in the same way as flex
itself would, this is a behavior is known as "collapsing" can occur.
In this context, "collapsing" refers to the behavior where the ResponsiveColumn
elements wrap onto a new line within the table, rather than expanding the table's width to accommodate their combined width.
Contributions to responsive-email
are welcome! If you find a bug, have suggestions for improvements, or want to add new features, feel free to open an issue or submit a pull request. Please make sure to follow the existing coding style and conventions.
When submitting a pull request, provide a clear description of the changes made and ensure that all tests pass. Adding appropriate tests for new features or bug fixes is highly appreciated.
For bugs and feature requests, please create an issue.
responsive-email
is licensed under the MIT License.
No vulnerabilities found.
No security vulnerabilities found.