# foundation-emails

> A framework for responsive emails

Latest version **2.5.1** (published 2026-03-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install foundation-emails
pnpm add foundation-emails
yarn add foundation-emails
bun add foundation-emails
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 2.5.1 |
| Published | 2026-03-12 |
| First published | 2016-02-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 471.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7794 |
| Author | Foundation |
| Maintainers | kbal11, rafibomb, joeworkman |
| Keywords | responsive, emails |

## Links

- npm: https://www.npmjs.com/package/foundation-emails
- Repository: https://github.com/foundation/foundation-emails
- Homepage: https://github.com/foundation/foundation-emails#readme
- Issues: https://github.com/foundation/foundation-emails/issues
- npm.io page: https://npm.io/package/foundation-emails

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 2.5.1 (latest) — 2026-03-12
- 2.5.0 — 2026-03-11
- 2.4.0 — 2022-03-22
- 2.3.1 — 2020-07-23
- 2.3.0 — 2020-07-21
- 2.2.1 — 2016-06-30
- 2.2.0 — 2016-06-30
- 2.1.0 — 2016-04-21
- 2.0.1 — 2016-04-13
- 2.0.0 — 2016-03-23
- 2.0.0-rc.4 — 2016-03-21
- 2.0.0-rc.3 — 2016-03-08
- 2.0.0-rc.2 — 2016-02-18
- 2.0.0-rc.1 — 2016-02-17
- 2.0.0-beta.2 — 2016-02-17
- … 1 more at https://npm.io/package/foundation-emails/versions

## README

# [Foundation for Emails](https://get.foundation/emails)

[![npm version badge](https://img.shields.io/npm/v/foundation-emails.svg)](https://www.npmjs.org/package/foundation-emails)
[![downloads badge](http://img.shields.io/npm/dm/foundation-emails.svg)](https://www.npmjs.org/package/foundation-emails)
[![Gem Version](https://badge.fury.io/rb/foundation_emails.svg)](https://badge.fury.io/rb/foundation_emails)
[![downloads badge](http://img.shields.io/npm/l/foundation-emails.svg)](https://www.npmjs.org/package/foundation-emails)
[![CDNJS](https://img.shields.io/cdnjs/v/foundation-emails.svg)](https://cdnjs.com/libraries/foundation-emails)


Foundation for Emails (previously known as Ink) is a framework for creating responsive HTML emails that work in any email client &mdash; even Outlook. Our HTML/CSS components have been tested across every major email client to ensure consistency. And with the [Inky](https://github.com/foundation/inky) templating language, writing HTML emails is now even easier.

## Getting Started

The main way to get started is with our [email template stack](https://github.com/foundation/foundation-emails-template). To use the stack, you'll need [Node.js](https://nodejs.org/en/) no greater than version 10 installed on your machine.

`nvm` installation instructions can be found [here](https://github.com/nvm-sh/nvm#install--update-script)

To set up the emails template, run these commands:

```bash
git clone https://github.com/foundation/foundation-emails-template project
cd project
nvm install 10
nvm use 10
npm install
```

Then run `npm start` to run the project. A new browser window will open with a BrowserSync server showing the finished files.

Run `npm run build` to do a full email inlining process.


#### Using the Ruby gem

**foundation_emails** is a gem that enables you to use Foundation for Emails assets within a Rails project. To install in your app:

1. Add the following line to your Gemfile:

  ```ruby
  gem 'foundation_emails'
  ```

2. Then execute:

  ```bash
  bundle install
  ```

3. Import Foundation for Emails in your emails' stylesheet(s):

  ```scss
  // app/assets/stylesheets/your_emails_stylesheet.scss

  @import "foundation-emails";
  ```

Adding Inky's templating capabilities to Rails is easy thanks to the [**inky-rb**](https://github.com/foundation/inky-rb) gem, which bundles `foundation_emails` by default.

## Documentation

**Check out our [Migration Guide](https://github.com/foundation/foundation-emails/blob/master/migration.md) for upgrading an existing template or for more in-depth code examples.**

Foundation for Emails 2.0 documentation and framework are on the `develop` branch and you can compile it on your own machine.

Run these commands to set up the documentation:

```bash
git clone https://github.com/foundation/foundation-emails.git
cd foundation-emails
```

Foundation for Emails 2.0 documentation is on the `develop` branch.

```bash
git fetch
git checkout develop
npm install
```

Then run `npm start` to compile the documentation. When it finishes, a new browser window will open pointing to a BrowserSync server displaying the documentation.

## Testing

Run `npm run test:visual` to compile the visual regression tests. All of the pages under `test/visual/pages` are compiled and inlined. From there, they can be uploaded to Litmus for testing.

## Inky

[Inky](https://github.com/foundation/inky) is our new templating language that converts simple HTML into the complex tables required for email layout.

The parser converts a set of custom HTML tags, expanding them out into full HTML syntax. Below is a list of every custom element.

### Grid

```html
<container>
  <row>
    <column small="12" large="4"></column>
    <column small="12" large="8"></column>
  </row>
</container>
```

### Block Grid

```html
<block-grid up="3">
  <td></td>
  <td></td>
  <td></td>
</block-grid>
```

### Components

```html
<button href="http://get.foundation"></button>
```

```html
<menu>
  <item href="one.html">Item One</item>
  <item href="one.html">Item Two</item>
  <item href="one.html">Item Three</item>
</menu>
```

## Future Plans

Foundation for Emails will be merging into the [Inky](https://github.com/foundation/inky) project starting with Inky v2.0. Inky will become a complete email framework — combining the templating engine and the styling framework (currently Foundation for Emails) into a single project.

**What this means:**
- The styling portion of Foundation for Emails will live on as **Inky Styles** within the Inky repo
- The Inky templating engine is being rewritten in Rust, with bindings for JavaScript (via WASM), PHP, Python, Ruby, and Go
- This repo will continue to receive maintenance updates but new feature development will happen in Inky v2

Follow progress on the [Inky repo](https://github.com/foundation/inky).

## Contributing

As an open source project, we love our community support. Please file issues, or better yet pull requests on the [Foundation for Emails Repo](https://github.com/foundation/foundation-emails). We're stoked to hear your feedback, make improvements, and keep evolving Foundation for Emails!

Copyright (c) 2026 Foundation, inc.

---
_Source: https://npm.io/package/foundation-emails · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
