Installation

npm

npm install --save super-controls

super-controls ships with both ES modules and CommonJS modules. Bundlers like Rollup and Webpack 2+ will import the ES modules by default. Tools like Browserify will find the CommonJS modules with require.

ES2015 import Syntax
import React from 'react'
import ReactDOM from 'react-dom'
import { Form, Field } from 'super-controls'
CommonJS require Syntax
const React = require('react')
const ReactDOM = require('react-dom')
const { Form, Field } = require('super-controls')

unpkg

Development and production builds of super-controls are made available as a UMD bundle through unpkg. Set the src attribute of your script tag to load the desired package. super-controls has a couple of dependencies that need to be loaded first.

<!DOCTYPE html>
<html>
<body>
  <script src="https://unpkg.com/prop-types@^15/prop-types.min.js"></script>
  <script src="https://unpkg.com/react@^16/umd/react.production.min.js"></script>
  <script src="https://unpkg.com/react-dom@^16/umd/react-dom.production.min.js"></script>
  <script src="https://unpkg.com/super-controls/umd/super-controls.min.js"></script>
  <script>
    const { Form, Field } = SuperControls
  </script>
</body>
</html>

results matching ""

    No results matching ""