Skip to content

Loading the library#

Choose your favorite import method

From installed sources#

1
2
3
<script type="module">
    import './node_modules/@simomosi/dynamic-forms/dist/dynamicforms.min.js';
</script>
1
const dynamicForms = require('@simomosi/dynamic-forms');
1
<script src='./node_modules/@simomosi/dynamic-forms/dist/dynamicforms.min.js'></script>

Note that 2 different sources exist:

  • @simomosi/dynamic-forms/src is the actual source code
  • @simomosi/dynamic-forms/dist (recommended) is built bundle: sources are transpiled with Webpack and Babel to enhance performance and ensure compatibility with different browsers

From CDN#

1
<script src = 'https://unpkg.com/@simomosi/dynamic-forms@latest'></script>
1
2
3
<script type="module">
    import 'https://unpkg.com/@simomosi/dynamic-forms@latest';
</script>

Be careful to not include the library twice!