All Projects → sbekrin → Styled Email Components

sbekrin / Styled Email Components

Licence: mit
💌 styled-components for emails

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Styled Email Components

Styled Components Vs Emotion
a short doc comparing the popular CSS-in-JS libraries styled-components and emotion
Stars: ✭ 204 (-11.69%)
Mutual labels:  styled-components, css-in-js
Next Dark Mode
🌑 Enable dark mode for Next.js apps
Stars: ✭ 133 (-42.42%)
Mutual labels:  styled-components, css-in-js
Xstyled
A utility-first CSS-in-JS framework built for React. 💅👩‍🎤⚡️
Stars: ✭ 1,835 (+694.37%)
Mutual labels:  styled-components, css-in-js
Nanostyled
A <1kB library for styling React components as if with CSS-in-JS, without CSS-in-JS
Stars: ✭ 104 (-54.98%)
Mutual labels:  styled-components, css-in-js
Filbert Js
A lightweight(~1kb) css-in-js framework
Stars: ✭ 167 (-27.71%)
Mutual labels:  styled-components, css-in-js
Styled Typography
Typograpy components for react and styled-components
Stars: ✭ 113 (-51.08%)
Mutual labels:  styled-components, css-in-js
React Next Boilerplate
🚀 A basis for reducing the configuration of your projects with nextJS, best development practices and popular libraries in the developer community.
Stars: ✭ 129 (-44.16%)
Mutual labels:  styled-components, css-in-js
Horror
😱 React HTML elements with CSS-in-JS
Stars: ✭ 78 (-66.23%)
Mutual labels:  styled-components, css-in-js
Gatsby Theme Superstylin
💅 A Gatsby Theme with styled-components
Stars: ✭ 165 (-28.57%)
Mutual labels:  styled-components, css-in-js
Styled Bootstrap
💅🏻 A styled-component implementation of Bootstrap
Stars: ✭ 154 (-33.33%)
Mutual labels:  styled-components, css-in-js
Css In React
🍭 CSS in React - Learn the best CSS in JS frameworks by example
Stars: ✭ 101 (-56.28%)
Mutual labels:  styled-components, css-in-js
Styled Theme
Extensible theming system for styled-components 💅
Stars: ✭ 183 (-20.78%)
Mutual labels:  styled-components, css-in-js
Onno
Responsive style props for building themed design systems
Stars: ✭ 95 (-58.87%)
Mutual labels:  styled-components, css-in-js
Styled By
Simple and powerful lib to handle styled props in your components
Stars: ✭ 122 (-47.19%)
Mutual labels:  styled-components, css-in-js
React Image Smooth Loading
[not maintained] Images which just flick to appear aren't cool. Images which appear smoothly with a fade like Instagram are cool
Stars: ✭ 84 (-63.64%)
Mutual labels:  styled-components, css-in-js
Scoped Style
A tiny css in js library 🚀
Stars: ✭ 129 (-44.16%)
Mutual labels:  styled-components, css-in-js
Tailwind Styled Component
Create Tailwind CSS React components like styled components with class names on multiple lines and conditional class rendering
Stars: ✭ 57 (-75.32%)
Mutual labels:  styled-components, css-in-js
Styled Components Rhythm
Vertical Rhythm and Font Baselines with Styled Components
Stars: ✭ 76 (-67.1%)
Mutual labels:  styled-components, css-in-js
Goober
🥜 goober, a less than 1KB 🎉 css-in-js alternative with a familiar API
Stars: ✭ 2,317 (+903.03%)
Mutual labels:  styled-components, css-in-js
Grid
This package has moved and renamed
Stars: ✭ 2,079 (+800%)
Mutual labels:  styled-components, css-in-js

💌 styled-email-components

npm Version Build Status dependencies Status devDependencies Status Greenkeeper badge

Extension of styled-components with essential features for building email components.

Important: due to dependencies on styled-components internals, latest compatible version of styled-components is 3.4.1. We'll re-evaluate design of this module after stable v4 release of styled-components. Thanks!

Features

Motivation

styled-components is a universal styling solution with great developer experience and low learning curve. Unfortunately, there's no native support for inline styling which is essential for building emails. This module adds all necessary features to build mail-first components.

Installation

Don't forget to install styled-components itself as a peer dependency.

yarn:

yarn add styled-email-components styled-components

npm:

npm install --save styled-email-components styled-components

Getting Started

Check original Gettings Started for more examples.

import React from 'react';
import { renderToStaticMarkup } from 'react-dom/server';
import styled from 'styled-email-components';

const Link = styled.a`
  font-family: sans-serif;
  background: blue;
  color: white;
`;

renderToStaticMarkup(<Link href="https://example.com">Hey</Link>),
// 👇 output
// <a href="https://example.com" style="font-family:sans-serif;background-color:blue;color:white;">Hey</a>

API

styled.*

This module sets list of XHTML 1.0 Transitional element aliases instead of the original HTML5 set, which is a widely used doctype in emails.

styled.vml.*

In addition to XHTML elements, styled.vml.*, styled.wml.* and styled.office.* aliases are available. These are simple proxies and pass tag names as-is with v:, w: and o: prefixes respectevly.

Other APIs

Original APIs are mirrored without any modifications from styled-components. Make sure to check server-side rendering guide for rendering the final email.

License

MIT © Sergey Bekrin

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].