
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
@nylas/components-email
Advanced tools
Nylas Email (`<nylas-email>`) is part of the Nylas Components library that lets you build event/calendar applications in minutes. Use Nylas Email with your Nylas account or by passing in your own JSON data.
Nylas Email (<nylas-email>) is part of the Nylas Components library that lets you build event/calendar applications in minutes. Use Nylas Email with your Nylas account or by passing in your own JSON data.
Nylas Email is currently in active development. Want to contribute? Find out how!

In your JavaScript application, you can install Nylas Email with:
npm i @nylas/components-emailyarn add @nylas/components-emailAlternatively, on an html page, you can load the Email using a script tag:
<head>
<!-- Import the script from CDN -->
<script src="https://unpkg.com/@nylas/components-email"></script>
</head>
For both installation options, in the body of your page, you can instantiate the email component with <nylas-email></nylas-email>.
All Nylas components have two ways of displaying data to your end-user:
If you haven't registered for a Nylas account yet, you can do so at dashboard.nylas.com. Once there, head to the Components tab and create a new Email component.
You'll be guided through the component setup and be given the option to tie your component to a thread. Review the Email Documentation.
During the setup process, you'll be prompted to provide a list of allowed domains. Be sure to add any domains you'll be testing your app on, including localhost, and any staging and production URLs you might use.
Nylas Email can be used as a UI on top of any thread data that you provide. Threads should follow the Nylas thread object standard.
The property to use for this is thread. You can pass in a JSON thread with an array of messages.
const staticThread =
{
"account_id":"adsghdgajhsgdikzvz9afb",
"drafts":[],
"first_message_timestamp":1621472861,
"has_attachments":false,
"id":"daskjdkahskjdhk7md84fgk",
"labels":[
{"display_name":"Inbox","id":"asdghsdfafasdfdsfcm4","name":"inbox"}
],
"last_message_received_timestamp":1621472865,
"last_message_sent_timestamp":null,
"last_message_timestamp":1621472865,
"messages":[
{
"account_id":"adsghdgajhsgdikzvz9afb",
"bcc":[],
"cc":[
{"email":"phil.r@nylas.com","name":"Phil Renaud"},
{"email":"review_requested@noreply.github.com","name":"Review requested"}
],
"date":1621472861,
"files":[],
"from":[
{"email":"notifications@github.com","name":"Mostafa Rashed"}
],
"id":"epgdadhsgfdghasyy6h9yyle6v",
"labels":[
{"display_name":"Inbox","id":"3fhdx7ssdfsfsdfm5ecwcm4","name":"inbox"}
],
"object":"message",
"reply_to":[
{"email":"abcd@reply.github.com","name":"nylas/nylas-nodejs"}
],
"snippet":"Hi, Welcome to Nylas",
"starred":false,
"subject":"Hello from Nylas",
"thread_id":"ddfgdfdgdjsgdjhas7md84fgk",
"to":[
{"email":"nylas-nodejs@noreply.github.com","name":"nylas/nylas-nodejs"}
],
"unread":true
},
{}
],
"snippet":"Hi, Welcome to Nylas",
"starred":false,
"subject":"Hello from Nylas",
"unread":true,
"version":1
}
Then pass the array into your component using any JavaScript.
<nylas-email thread={thread}>
<nylas-email thread_id={thread_id}>
<nylas-email message={message}>
<nylas-email message_id={message_id}>
You can also use plain JavaScript as an attribute.
document.querySelector("nylas-email").thread = staticThread;
document.querySelector("nylas-email").thread_id = staticThreadID;
document.querySelector("nylas-email").message = staticMessage;
document.querySelector("nylas-email").message_id = staticMessageID;
Nylas Email allows for several properties that affect the layout and functionality of your component. You can find a complete list of properties within our Documentation for Nylas Email
You can listen to certain user events from your application by adding an event listener to your component.
For example, you can listen for a threadClicked event with the following code:
document
.querySelector("nylas-email")
.addEventListener("threadClicked", (event) => {
let { detail } = event;
console.log("thread clicked: ", detail.thread);
});
A list of emitted events is available on our Documentation for Nylas Email
Please refer to our Contributing Guidelines for information about how to get involved. We welcome bug reports, questions, and pull requests.
git@github.com:nylas/components.gityarn installyarn start; your browser will load http://localhost:8000 and show you a list of available running componentsyarn cy:open will launch our end-to-end tests in a browser
tests will automatically be run on push from push.yaml
FAQs
Nylas Email (`<nylas-email>`) is part of the Nylas Components library that lets you build event/calendar applications in minutes. Use Nylas Email with your Nylas account or by passing in your own JSON data.
The npm package @nylas/components-email receives a total of 1,967 weekly downloads. As such, @nylas/components-email popularity was classified as popular.
We found that @nylas/components-email demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.