NextJS
Last updated
Was this helpful?
Last updated
Was this helpful?
Each widget comes with a Javascript and CSS file. To add a widgets to your website, you will need to add its corresponding Javascript and CSS to the pages/_app.js
of the Next app.
Example:
The uri for the Javascript and CSS for each widget is as follows:
If you always want the latest version, use latest for the <WIDGET_VERSION>. However, due to the changing nature of the codebase, it is possible that the "newer" latest is no longer compatible with the "previous" latest used to develop the app. It is thus recommended that you use a specific version of a widget for consistent results.
To use a widget, simply add a <div>
into each component you wish to use it in.
Example:
Since the Javascript only injects the widgets on the first page load, reactive apps will need to manually trigger the injection code upon page changes/refreshes. Do this by emitting the m-refresh-widgets event
Widgets are styled using standard CSS.
Some widgets may include links pointing to additional stylesheets. These additional stylesheets (usually named <WIDGET_NAME>.manifold-light.css
or <WIDGET_NAME>.manifold-dark.css
) build on top of the base stylesheet (usually named <WIDGET_NAME>.css
), thus the additional stylesheets should be included after the base one.
You can find a list of widgets, versions and links .
You can find a list of widgets, versions and links .
Examples of commonly used features can be found . Please feel free to use this as a starting point to building your own dApp.