npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cience-apps/nylas-components-composer

v1.0.15

Published

Nylas Composer (`<nylas-composer>`) is part of the Nylas Components library that lets you build email-send functionality into your application in minutes. Use Nylas Composer with your Nylas account or by passing in your own JSON data.

Downloads

6

Readme

Nylas Composer

Nylas Composer (<nylas-composer>) is part of the Nylas Components library that lets you build email-send functionality into your application in minutes. Use Nylas Composer with your Nylas account or by passing in your own JSON data.

Nylas Composer example

Table of Contents

Installation

In your JavaScript application, you can install Nylas Composer with:

  • npm npm i @nylas/components-composer
  • Yarn yarn add npm i @nylas/components-composer

Alternatively, on an html page, you can load the Composer using a script tag:

   <head>
      <!-- Import the script from CDN -->
      <script src="https://unpkg.com/@nylas/components-composer"></script>
    </head>

For both installation options, in the body of your page, you can instantiate the composer with <nylas-composer></nylas-composer>.

Using It in Your App

All Nylas components have two ways of dislaying data to your end-user:

  1. Fetching data directly from Nylas
  2. Passing in your own data

Fetching data directly from Nylas

Setup

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 Composer component.

You'll be guided through the component setup and be given the option to tie your component to your calendar account. Review the Composer Documentation.

Allowed domains

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.

Passing in your own data

Nylas Composer can be used as a UI on top of your own send hooks. Use Custom Callbacks to determine send and other functionality.

Properties

Nylas Composer 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 Composer

Events and Hooks

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 composerMinimized event with the following code:

document
  .querySelector("nylas-composer")
  .addEventListener("composerMinimized", (event) => {
    let { detail } = event;
    console.log("composer minimized", detail);
  });

You can also pass in custom hooks that allow you to add functionality in response to certain end-user events. Read more about Composer Custom Hooks or Try our custom hooks demo app

Contributing

Please refer to our Contributing Guidelines for information about how to get involved. We welcome bug reports, questions, and pull requests.

  1. Git clone [email protected]:nylas/components.git
  2. Run yarn install
  3. Run yarn start; your browser will load http://localhost:8000 and show you a list of available running components

Testing

yarn cy:open will launch our end-to-end tests in a browser tests will automatically be run on push from push.yaml

Additional Documentation