Install
The easiest way to use the toolkit is via CDN.
CSS
Installing the CSS
blaze.css contains everything you need. Link to it by adding the following to your
<head></head>
.
<link rel="stylesheet" href="https://unpkg.com/@blaze/css@x.x.x/dist/blaze/blaze.css">
Specifying a version is optional but it prevents against breaking changes.
How to start applying styles
We've designed the toolkit not to interfere with others or your own styles, hence Blaze won't automatically do anything to your site.
The following won't change by simply linking to blaze.css like it would with others such as Bootstrap or Foundation:
<button type="button">Button</button>
You need to apply our button classes:
<button class="c-button" type="button">Button</button>
This means you have to add classes to each part of your site where you want Blaze to apply. Take a look at the documentation for our objects, components, typography etc. and you'll see how intuitive it is to use.
JavaScript
Installing the JavaScript Components
Script tag
Link to it by adding the following to your <head></head>
.
<script type="module" src="https://unpkg.com/@blaze/atoms@x.x.x/dist/blaze-atoms/blaze-atoms.esm.js"></script>
<script nomodule="" src="https://unpkg.com/@blaze/atoms@x.x.x/dist/blaze-atoms/blaze-atoms.js"></script>
That's it! Start using the components in your HTML.
Node Modules
Run npm install @blaze/atoms --save
.
Put a script tag similar to this:
<script src="node_modules/@blaze/atoms/dist/blaze-atoms.js"></script>
in the head of your index.html Then you can use the element anywhere in your template, JSX, html etc.
In a Stencil App
Run npm install @blaze/atoms --save
.
Add an import:
import @blaze/atoms;
and you can use the elements anywhere in your template, JSX, html etc.
Integrating with a Framework
Blaze uses Stencil to compile our components into Web Components. And since they can be used within frameworks or in standard HTML websites the best resource to read is the Stencil documentation regarding framework integration.