{"id":22104513,"url":"https://github.com/virtru/virtuoso-design-system","last_synced_at":"2025-09-17T07:31:24.996Z","repository":{"id":37083178,"uuid":"281505676","full_name":"virtru/virtuoso-design-system","owner":"virtru","description":"Virtuoso Design System curated by @virtru UX \u0026 engineering","archived":false,"fork":false,"pushed_at":"2024-12-10T05:56:41.000Z","size":48093,"stargazers_count":5,"open_issues_count":109,"forks_count":19,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-01-03T01:14:49.695Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://virtru.github.io/virtuoso-design-system/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/virtru.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":".github/SECURITY.md","support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-21T21:14:00.000Z","updated_at":"2023-01-19T15:10:07.000Z","dependencies_parsed_at":"2023-02-14T09:01:56.966Z","dependency_job_id":"da5f9742-eb71-46e6-893f-1d051499cb91","html_url":"https://github.com/virtru/virtuoso-design-system","commit_stats":{"total_commits":437,"total_committers":28,"mean_commits":"15.607142857142858","dds":0.7803203661327232,"last_synced_commit":"e62e63774aa082d1335f02b56ecc8034d2e3c368"},"previous_names":[],"tags_count":123,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtru%2Fvirtuoso-design-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtru%2Fvirtuoso-design-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtru%2Fvirtuoso-design-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtru%2Fvirtuoso-design-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/virtru","download_url":"https://codeload.github.com/virtru/virtuoso-design-system/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233347380,"owners_count":18662654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T06:32:40.286Z","updated_at":"2025-09-17T07:31:18.851Z","avatar_url":"https://github.com/virtru.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Virtuoso Design System\n![Validate PR](https://github.com/virtru/virtuoso-design-system/workflows/Validate%20PR/badge.svg) ![Release](https://github.com/virtru/virtuoso-design-system/workflows/Release/badge.svg) ![Deploy Storybook](https://github.com/virtru/virtuoso-design-system/workflows/Deploy%20Storybook/badge.svg)\n\n\nThis repo enables using the Virtuoso Design System as front-end code (HTML, CSS, \u0026 JavaScript).\n\nThis project is not a common place for library reuse. For instance charts and graphs should be added to the app directly.\nFor charting we suggest [nivo charts](https://nivo.rocks).\n\n# 📖 [Dive into the docs](https://virtru.github.io/virtuoso-design-system/)\n\n# 🤖 [Explore the code](https://github.com/virtru/virtuoso-design-system)\n\n## Docs\n\nThe documentation for Virtuoso is [hosted on GitHub Pages](https://virtru.github.io/virtuoso-design-system/) and powered by [Storybook](https://storybook.js.org). \n\nTo run storybook locally:\n\n```shell\nnpm run storybook\n```\n\n## Installing\n\n\u003e 🚨 Virtuoso is still a work in progress and installation instructions are limited.\n\n### Create-React-App\n\nTo install with [Create React App](https://create-react-app.dev) you will need to use [Craco](https://github.com/gsoft-inc/craco) (Create React App Configuration Override).\n\n1. Install Craco `npm i --save-dev craco`\n2. Install Craco-Antd plugin `npm i --save-dev craco-antd`\n3. Install Virtuoso and Antd `npm i --save virtuoso-design-system antd`\n4. Create a `craco.config.js` and add the config\n5. Use Virtuoso\n\nConfig:\n```js\n// craco.config.js\n// https://github.com/gsoft-inc/craco/blob/master/packages/craco/README.md#configuration\nconst { when, whenDev, whenProd, whenTest, ESLINT_MODES, POSTCSS_MODES } = require(\"@craco/craco\");\nconst CracoAntDesignPlugin = require(\"craco-antd\");\nconst VirtuosoTheme = require('virtuoso-design-system/dist/antd')\n\nmodule.exports = {\n  plugins: [\n    {\n      plugin: CracoAntDesignPlugin,\n      options: {\n        customizeTheme: VirtuosoTheme\n      }\n    }\n  ],\n} \n```\nUpdate the existing calls to react-scripts in the scripts section of your package.json file to use the craco CLI:\n\n```\n/* package.json */\n\n\"scripts\": {\n-   \"start\": \"react-scripts start\",\n+   \"start\": \"craco start\",\n-   \"build\": \"react-scripts build\",\n+   \"build\": \"craco build\"\n-   \"test\": \"react-scripts test\",\n+   \"test\": \"craco test\"\n}\n\n```\n\nIn index.css need add \n```\n@import '~virtuoso-design-system/dist/design_tokens.css';\n@import '~virtuoso-design-system/dist/bundle.cjs.css';\n@import '~virtuoso-design-system/dist/open-sans.css';\n@import '~virtuoso-design-system/dist/raleway.css';\n\nhtml {\n    font-size: 62.5%;\n}\n\n```\nExample:\n```\nimport React from 'react';\nimport { Button } from 'virtuoso-design-system';\n\nexport default function MyComponment() {\n return \u003cButton\u003eHi there!\u003c/Button\u003e\n}\n```\n\n## Design Tokens\n\n\u003e Design tokens are the visual design atoms of the design system — specifically, they are named entities that store visual design attributes. We use them in place of hard-coded values (such as hex values for color or pixel values for spacing) in order to maintain a scalable and consistent visual system for UI development.\n\u003e\n\u003e — [Salesforce Lightning Design System](https://www.lightningdesignsystem.com/design-tokens/)\n\n[Style Dictionary](https://amzn.github.io/style-dictionary/#/) is a build system that allows you to define **design tokens** once, in a way for any platform or language to consume. \n\n1. Our design tokens are defined in `lib/styles/style_dict/tokens/` as JSON files…\n\n1. …read by the config in `lib/styles/style_dict/config.json`\n\n1. …and built by the command \n```shell\nnpm run style-dictionary:build\n```\n\n1. …which creates `lib/styles/build/` files for CSS, JS, or whatever platform needs them.\n\n1. You can clear the built tokens with \n```shell\nnpm run style-dictionary:clean\n```\n\n\n\n\n\n## Examples\n\nExamples can be found in `/examples`\n\n\n\n\n\n## Releasing\n\nReleases are handled by [Auto](https://intuit.github.io/auto/). \n\n1. Please tag your PRs \"release\" in order for Auto to find them.\n\n2. Then, all you have to do is `npm run release` and you'll get:\n\n  * automatic changelog\n  * bump npm version\n  * publish to npm — based on your `npm login` or NPM_TOKEN in `.env`\n  * make a GitHub release — based on your GH_TOKEN in `.env`\n\nThis works with the magic described in [auto shipit docs](https://intuit.github.io/auto/docs/generated/shipit).\n\nA static version of the Storybook docs are generated automatically before we publish releases to npm. \n\n\n\n\n\n## Development \u0026 Testing \u0026 Updating\n\nTo develop new components make sure to:\n\n- add components to `/lib/components`\n- add helpers and hooks to `/lib/helpers`\n- add relevant stories to `/stories`\n- add tests next to the component\n\n**Run locally**\n\n```shell\nnpm run storybook\n```\n\n**Run tests**\n\n```shell\nnpm run test\n```\n\n\n\n\n\n## Visual Regression Testing (VRT)\n\nThis repository uses Loki for VRT to ensure the visual appearance of states of the components does not regress. Baseline reference images are intentionally checked into this repository in `.loki/reference/`.\n\n### Running VRT locally\n\nYou can run the VRT tests locally to check to see if your changes have caused visual regressions from the existing baselines for *all components* based on the `loki` config in **package.json**:\n\n```shell\nnpm run test:vrt\n```\n\nFor faster results, you can run a subset of tests using `--storiesFilter`: \n\n```shell\nnpm run test:vrt -- --storiesFilter=Input\n```\n\nAny failed tests will be output in `.loki/difference/`. You can inspect any visual differences that are highlighted in these output images.\n\nIf the differences are intended, you can update the baselines by following the instructions in the next section.\n\n### Updating Loki Baselines\n\n_Note_: Before performing this step, you must first run the VRT once (see previous section).\n\nIf you run the tests above and have legitimate changes in the visual appearance of the components, you can approve new baselines, which will replace the existing baseline images with the new, current images:\n\n```shell\nnpm run loki:approve\n```\n\nThis will immediately take all new baseline images from the last test run and replace the existing baseline images. If you wish to update a specific test case image only but reject other changes, see the [Loki CLI reference](https://loki.js.org/command-line-arguments.html).\n\nWe recommend only approving new baselines once all unintended visual changes have been fixed, then running the command above so no fine-grained filtering of new baselines is needed.\n\n---\n\nCopyright © 2020 Virtru Corporation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtru%2Fvirtuoso-design-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvirtru%2Fvirtuoso-design-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtru%2Fvirtuoso-design-system/lists"}