radix ui를 포함한 대부분의 visual libaries는 client component이다. It is because they
1. Rely on browser APIs
2. Use React hooks
3. Manipulate the DOM directly
4. Handle user interactions
Remember, email clients have very limited CSS support. Using utility classes like Tailwind or UI component libraries like Radix UI won't work well in emails.
하지만 너무 귀찮음
email template에 tailwind를 사용할 수 있게 해주는 react-email 사용.
단, 내가 커스터마이징한 tailwind component는 이 라이브러리에 포함이 되어있지 않아 사용할 수 없다.
npm install react-email -D -E
npm install @react-email/components
import { Html, Tailwind, Body, ... } from '@react-email/components'
const EmailTemplate = () => {
return (
<Html>
<Preview>Text on preview</Preview>
<Tailwind>
<Body>...</Body>
</Tailwind>
</Html>
)
}
export default EmailTemplate
Email clients don’t know your host
![]()