Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rolemodel/optics
Optics, a RoleModel Design System is an scss package that provides base styles and components that can be integrated and customized in a variety of projects.
https://github.com/rolemodel/optics
css design design-system design-systems optics sass scss storybook
Last synced: 27 days ago
JSON representation
Optics, a RoleModel Design System is an scss package that provides base styles and components that can be integrated and customized in a variety of projects.
- Host: GitHub
- URL: https://github.com/rolemodel/optics
- Owner: RoleModel
- License: mit
- Created: 2022-03-09T19:58:26.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-02T10:27:16.000Z (9 months ago)
- Last Synced: 2024-05-17T15:26:18.919Z (9 months ago)
- Topics: css, design, design-system, design-systems, optics, sass, scss, storybook
- Language: SCSS
- Homepage: https://docs.optics.rolemodel.design
- Size: 13.2 MB
- Stars: 15
- Watchers: 8
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Optics, a RoleModel Design System
[![Code](https://img.shields.io/badge/GitHub-Code-232323.svg?logo=github&logoColor=white)](https://github.com/RoleModel/optics)
[![License](https://img.shields.io/badge/license-MIT-232323.svg)](https://github.com/RoleModel/optics/blob/main/LICENSE)
[![npm](https://img.shields.io/npm/dw/@rolemodel/optics?label=npm)](https://www.npmjs.com/package/@rolemodel/optics)
[![Linting CI](https://github.com/RoleModel/optics/actions/workflows/linting.yml/badge.svg)](https://github.com/RoleModel/optics/actions/workflows/linting.yml)
Optics is an scss package that provides base styles and components that can be integrated and customized in a variety of projects.
## Installation
### NPM
```sh
npm install @rolemodel/optics
```### Yarn
```sh
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.
```scss
@import '@rolemodel/optics';
```If you are using a different compiler such as Dart Sass, you may need to reference the scss file directly.
```scss
@import '@rolemodel/optics/dist/scss/optics';
```## Documentation
We use [Storybook](https://storybook.js.org/docs/html/get-started/introduction) as a way to provide informative and interactive documentation.
It can be found here [Optics Documentation](https://docs.optics.rolemodel.design/)
### 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](https://github.com/UX-and-I/storybook-design-token#available-presenters)
Add the following above a group to categorize the tokens.
```css
/**
* @tokens Basic Colors
* @presenter Color
*/
```### Component Documentation
For instructions on how to create a new component, see [Process for Creating New Components](./NEW_COMPONENT.MD)
Additional stories can be added using the following command, or copying an existing story.
```sh
npm run generate
```The visual graphic found on the Selective Imports page in the documentation is generated from the `tools/generate-graph.dot` file. You can preview and export a newer svg version of the graphic by using the `tintinweb.graphviz-interactive-preview` VSCode extension.
## License
[MIT](LICENSE)