Skip to content

optics 0.2.5

Install from the command line:
Learn more about npm packages
$ npm install @rolemodel/optics@0.2.5
Install via package.json:
"@rolemodel/optics": "0.2.5"

About this version

Optics, a RoleModel Design System

Linting CI

Optics is an scss package that provides base styles and components that can be integrated and customized in a variety of projects.

Installation

NPM

npm install @rolemodel/optics

Yarn

yarn add @rolemodel/optics

Import

If you are using webpack to compile, you can add this import to the top of your root level scss file.

@import '@rolemodel/optics';

If you are using a different compiler such as Dart Sass, you may need to reference the scss file directly.

@import '@rolemodel/optics/dist/scss/optics';

Documentation

We use Storybook as a way to provide informative and interactive documentation.

It can be found here Optics Documentation

Tokens

Tokens are defined in src/core/tokens

  • All core tokens are defined in src/core/tokens/base_tokens.scss
  • Basic color tokens are defined in src/core/tokens/example_color_tokens.scss
  • Color scale tokens are defined in src/core/tokens/scale_color_tokens.scss
  • Alert color tokens are defined in src/core/tokens/alert_color_tokens.scss
  • Dark mode tokens are defined in src/core/tokens/dark_mode_tokens.scss

There are also a few component specific tokens that are defined in their respective component file, but those are not indented to be global or used outside of that file.

There is a JSON file in docs/token_structure.json that lists all the current tokens in one place and shows how the names indicate organization.

Token Documentation

We use the Storybook Design Token for showing design tokens in the documentation. This allows us to tag groups of tokens with a category and a presenter.

Available Presenters

Add the following above a group to categorize the tokens.

/**
* @tokens Basic Colors
* @presenter Color
*/

License

MIT

Details


Assets

  • optics-0.2.5.tgz

Download activity

  • Total downloads 15
  • Last 30 days 0
  • Last week 0
  • Today 0