#Can I use the UI-library with templates? All the docs are geared toward dashbaords and packages.

1 messages · Page 1 of 1 (latest)

ruby surge
#

If you go to the github repo of the ui library:
https://github.com/umbraco/Umbraco.UI/tree/v1/contrib/packages/uui

You'll find this snippet:

<!-- Latest Version -->
<script src="https://cdn.jsdelivr.net/npm/@umbraco-ui/uui@latest/dist/uui.min.js"></script>

<!-- Specific version -->
<script src="https://cdn.jsdelivr.net/npm/@umbraco-ui/[email protected]/dist/uui.min.js"></script>

Just including this script tag, should be enough to make all the UUI components available on your razor template.

If you link directly to the cdn, you should also add a subresource integrity hash to the script tag.

GitHub

Umbraco UI Components. Contribute to umbraco/Umbraco.UI development by creating an account on GitHub.

ivory gate
#

Looks like I'm trying to do it in a way that isn't supported. An npm package of the ui-library is what I wanted. I also wanted to try out the UI components outside of umbraco.
I should have been more specific, I wanted to use npm and have code hosted locally, not via a CDN. Sometimes I work where I have no internet.
Currently getting a ot of errors installing with NPM to do with the Lerna package. Think I'll drop this for now.