Individual Packages
If you require a specific installation, you can install Hopper UI packages separately.
Tokens
Installation
Run the following command to install the tokens package.
Usage
Import the tokens in your project by doing the following:
If your application supports a dark mode, import dark mode tokens as well:
You can now use the tokens in your project by using the following syntax:
Fonts
In order to use Hopper fonts in your project, import the following:
Font-face declarations are now imported in your project.
Failing to do so would prevent you from using font family tokens such as var(--hop-font-family-primary)
.
Inter and ABC Favorit variable fonts are used. This allows for a more efficient use of font files, only one font is loaded per typeface, covering all font-weights. Resulting in a smaller bundle size for all.
Styled System
A styled system package inspired by styled-components will be released, allowing the use of these tokens as JavaScript props at a later time.
Icons
Installation
Usage
You can now use icons and rich icons in your project by using the following syntax:
Standalone Installation
It is recommended to use @hopper-ui/icons
with @hopper-ui/components
. The standalone installation procedure is detailed in case you only need the icons, and not the components. This is also the installation process until the components are released.
Import the styles in your project:
Configuring your application is a little different:
Using the icon is the exact same way as with the default package.
React 16 Installation
If you're using React 16, you need to use the @hopper-ui/icons-react16
package.
The usage is the same as the default package, you only need to import the icons from a different package.