Skip to content

numldesign/gatsby-plugin-numl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-plugin-numl

A Gatsby plugin for Numl Design System.

There is no full SSR support at the moment, but you can use it with npm run build without any problem except SEO optimizations.

Install

Install this module via npm:

npm i -D gatsby-plugin-numl

How to use

There are no options for the plugin. Just add gatsby-plugin-numl to the plugins section of the gatsby-config.js:

// gatsby-config.js

module.exports = {
  plugins: [`gatsby-plugin-numl`],
};

Support for Native Events

Install jsx-native-events to add support for native events that are used in Web Components.

Numl has two main events: tap (for action elements) and input (for widget elements like input, slider and more).

/* @jsx nativeEvents */
import nativeEvents from 'jsx-native-events';

export default function Input({ onInput }) {
    function handle(e) {
        if (onInput) {
          onInput(e.detail);
        }
    }

    return <nu-input onEventInput={handle}></nu-input>;
}

Examples

You learn more about Numl Design System visit the Official Numl Site.