@emailux/css
v1.0.1
Published
A React email css component to to style your email (EmailUX Mailer)
Downloads
120
Maintainers
Readme
@emailux/css
Css component used inside tag.
Installation
# pnpm
pnpm add @emailux/css
# npm
npm install @emailux/css
# yarn
yarn add @emailux/cssQuick start
import { Html, Head } from "@emailux/components";
import { Css } from "@emailux/css";
// Can also be imported from "@emailux/components"
// import { Css } from "@emailux/components";
export default function EmailTemplate() {
return <Html>
<Head>
<Css
selector={['body', '.inkdes-table']}
style={{ fontSize: '12px', lineHeight: '24px', color: '#000' }}
/>
<Head>
</Html>
}Props
| Name | Type | Required | Default | Description | | -------- | ---------------------- | -------- | ------- | ----------------------------------- | | children | React.ReactNode | Yes | — | Content of the email document | | style | React.CSSProperties | Yes | — | - | | selector | Array of strings of css selectors | No | — | |
All other standard Head attributes for the <css> element are supported.
License
MIT © iClasser
