{"id":25638370,"url":"https://github.com/virtuslab/tetrisly-react","last_synced_at":"2025-10-08T19:32:34.465Z","repository":{"id":208991825,"uuid":"650166277","full_name":"VirtusLab/tetrisly-react","owner":"VirtusLab","description":"Tetrisly offers user-friendly components designed for effortless integration. Plus, it's fully compatible with Tetrisly for Figma with a seamless design and development experience in mind.","archived":false,"fork":false,"pushed_at":"2025-09-24T20:08:58.000Z","size":33348,"stargazers_count":41,"open_issues_count":9,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-10-02T21:32:52.465Z","etag":null,"topics":["design-system","design-tokens","figma","react","styled-components","xstyled"],"latest_commit_sha":null,"homepage":"http://tetrisly.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VirtusLab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-06-06T13:36:20.000Z","updated_at":"2025-07-15T05:47:33.000Z","dependencies_parsed_at":"2023-11-24T12:29:46.744Z","dependency_job_id":"76706631-1da4-4f7d-8956-f5dd7f5f0ed2","html_url":"https://github.com/VirtusLab/tetrisly-react","commit_stats":null,"previous_names":["virtuslab/tetrisly-react"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/VirtusLab/tetrisly-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VirtusLab%2Ftetrisly-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VirtusLab%2Ftetrisly-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VirtusLab%2Ftetrisly-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VirtusLab%2Ftetrisly-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VirtusLab","download_url":"https://codeload.github.com/VirtusLab/tetrisly-react/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VirtusLab%2Ftetrisly-react/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000703,"owners_count":26082805,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["design-system","design-tokens","figma","react","styled-components","xstyled"],"created_at":"2025-02-23T02:25:00.982Z","updated_at":"2025-10-08T19:32:34.432Z","avatar_url":"https://github.com/VirtusLab.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://storybook.tetrisly.com/header.svg\" width=\"100%\" alt=\"css-in-readme\"\u003e\n\n# Tetrisly for React\n\n🧩 Tetrisly offers user-friendly components designed for effortless integration. Plus, it's fully compatible with Tetrisly for Figma with a seamless design and development experience in mind.\n\nIf you want to know more about Tetrisly, check out our website: [tetrisly.com](https://tetrisly.com/)\n\n## Tech Stack\n\n- [React 18](https://react.dev/)\n- [xstyled](https://xstyled.dev/)\n\nWe've decided to use `xstyled` for styling our components. If you are interested in our reasoning, check out our article on this topic: [Style Wars: Tailwind vs. CSS-in-JS in Design Systems Implementation](https://medium.com/tetrisly/style-wars-tailwind-vs-css-in-js-in-design-systems-implementation-de6015ee2695)\n\n## Installation\n\nInstall `tetrisly-react` with npm (you can do the same with yarn, pnpm or any other package manager)\n\n```bash\n  npm install @virtuslab/tetrisly-react\n```\n\nand dependencies:\n\n```bash\n  npm install styled-components @xstyled/styled-components\n```\n\n## Setup\n\n### TetrislyProvider\n\nAfter installing the package, you need to wrap your application in the `TetrislyProvider` component. This will provide the theme and other context to your application.\n\n```jsx\nimport { TetrislyProvider } from '@virtuslab/tetrisly-react';\n\nfunction App() {\n  return (\n    \u003cTetrislyProvider\u003e\n      \u003cYourApp /\u003e\n    \u003c/TetrislyProvider\u003e\n  );\n}\n```\n\nTetrislyProvider accepts optional prop `theme` which can be used to override default theme.\n\n```jsx\nimport { TetrislyProvider } from '@virtuslab/tetrisly-react';\n\nfunction App() {\n  return (\n    \u003cTetrislyProvider\n      theme={{\n        colors: {\n          '$color-semantic-brand--4': th.color('$color-raspberry--4'),\n          '$color-semantic-brand--3': th.color('$color-raspberry--3'),\n          '$color-semantic-brand--2': th.color('$color-raspberry--2'),\n          '$color-semantic-brand--1': th.color('$color-raspberry--1'),\n          '$color-semantic-brand-0': th.color('$color-raspberry-0'),\n          '$color-semantic-brand-+1': th.color('$color-raspberry-+1'),\n          '$color-semantic-brand-+2': th.color('$color-raspberry-+2'),\n          '$color-semantic-brand-+3': th.color('$color-raspberry-+3'),\n          '$color-semantic-brand-+4': th.color('$color-raspberry-+4'),\n          '$color-semantic-brand-+5': th.color('$color-raspberry-+5'),\n          '$color-semantic-brand-+6': th.color('$color-raspberry-+6'),\n          '$color-semantic-brand-+7': th.color('$color-raspberry-+7'),\n          '$color-semantic-brand-+8': th.color('$color-raspberry-+8'),\n        },\n      }}\n    \u003e\n      \u003cYourApp /\u003e\n    \u003c/TetrislyProvider\u003e\n  );\n}\n```\n\n### Default theme\n\nOur default theme contains all of fundamental Tetrisly Design Tokens, you can use it with `xstyled` props to easy set up\nyour design. See `tet.*` utility [example of use](#tet-utility).\n\nHere you can see the\n[default theme](https://github.com/VirtusLab/@tetrisly/react/blob/development/src/theme/defaultTheme.ts) or a complete\nlist of theme options.\n\n### Default font\n\nTetrisly uses [Inter](https://fonts.google.com/specimen/Inter) font as default. To add it to your app you should link it\nin your root `.html` file:\n\n```html\n\u003clink rel=\"preconnect\" href=\"https://fonts.googleapis.com\" /\u003e\n\u003clink rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin /\u003e\n\u003clink\n  href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;450;600\u0026display=swap\"\n  rel=\"stylesheet\"\n/\u003e\n```\n\n## `tet.*` utility\n\n`tet` function is our extension of xstyled `x.*` utility. Both has the same API, but we will add some extra features in\nnear future. You can read more [here](https://xstyled.dev/docs/utility-props/).\n\n### Example of use\n\n```jsx\nimport {\n  TetrislyProvider,\n  Button,\n  theme,\n  tet,\n} from '@virtuslab/tetrisly-react';\n\nconst App = () =\u003e (\n  \u003cTetrislyProvider\u003e\n    \u003ctet.div\n      display=\"flex\"\n      justifyContent=\"center\"\n      alignItems=\"center\"\n      h=\"100vh\"\n    \u003e\n      \u003ctet.div\u003e\n        \u003ctet.h1\n          textAlign=\"center\"\n          mb=\"$dimension-200\"\n          text=\"$typo-header-4xLarge\"\n          color=\"$color-content-primary\"\n        \u003e\n          Hello world!\n        \u003c/tet.h1\u003e\n        \u003ctet.div display=\"flex\" justifyContent=\"center\" alignItems=\"center\"\u003e\n          \u003ca\n            href=\"https://storybook.tetrisly.com\"\n            target=\"_blank\"\n            rel=\"noreferrer\"\n          \u003e\n            \u003cButton label=\"Go to Storybook\" appearance=\"primary\" /\u003e\n          \u003c/a\u003e\n        \u003c/tet.div\u003e\n      \u003c/tet.div\u003e\n    \u003c/tet.div\u003e\n  \u003c/TetrislyProvider\u003e\n);\n\nexport default App;\n```\n\n## Run Locally\n\nClone the project\n\n```bash\n  git clone https://github.com/VirtusLab/tetrisly-react\n```\n\nGo to the project directory\n\n```bash\n  cd tetrisly-react\n```\n\nInstall dependencies\n\n```bash\n  yarn install\n```\n\nStart the storybook server\n\n```bash\n  yarn storybook\n```\n\n## Running Tests\n\nTo run tests, run the following command\n\n```bash\n  yarn test\n```\n\n## Documentation\n\n\u003cimg src=\"https://storybook.tetrisly.com/logo-docs.svg\" /\u003e\n\nIf you want to dive deeper into the components Tetrisly offers, check out our official documentation: [Tetrisly Docs](https://docs.tetrisly.com/)\n\nYou can also check out our Storybook, which is our Documentation for React components (now in progress): [Tetrisly Storybook](https://virtuslab.github.io/tetrisly-react/?path=/docs/alertbanner--docs)\n\n## Customization\n\nAll Tetrisly components have a `custom` prop. It makes it possible to customize the component without the need to create a new one. Below you can see an example of Button customization\n\n### Button\n\nIf you want to change any of button styles, you can make it by passing custom props with object based on\nspecific component config.\n\nFor instance, to change background-color of appearance=\"primary\" intent=\"secondary\" variant to pink, just pass\nreferenced object structure:\n\n```jsx\n\u003cButton\n  label=\"Button label\"\n  appearance=\"primary\"\n  intent=\"success\"\n  custom={{\n    default: {\n      appearance: {\n        primary: {\n          intent: {\n            success: {\n              backgroundColor: 'raspberry-0', // you can also pass any color value not included in default theme\n            },\n          },\n        },\n      },\n    },\n  }}\n/\u003e\n```\n\nwe are still working on it, thanks for your feedback here!\n\n### Useful links\n\n- [Tetrisly Storybook](https://storybook.tetrisly.com/)\n- [Tetrisly Figma Docs](https://docs.tetrisly.com/)\n- [Tetrisly Figma Preview](https://tetrisly.com/preview)\n- [xstyled Docs](https://xstyled.dev/)\n\n## Getting Help\n\nIf at any point you need help, feel lost, or have some feedback for us, you can create issues on our GitHub repository, or reach out to us on out Discord Server: [Tetrisly Discord](https://discord.gg/MPefZwUZUu)\n\n## Testimonials\n\nIf you want to share with us your thoughts on Tetrisly, or showcase what you have built with it (it could be any aspect of our product, not only the React library), you can do it here: [Tetrisly Testimonials Form](https://senja.io/p/tetrisly/r/NfsRmn)\n\n## License\n\nWe are using the [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) for our library of components\n\n## VirtusLab\n\n\u003cimg src=\"https://storybook.tetrisly.com/logo-virtuslab.svg\" /\u003e\n\nMeet [VirtusLab](https://virtuslab.com/), the visionary team behind Tetrisly for React and the Tetrisly design system. Trusted by clients, they excel in product design, design systems and front-end engineering, creating mission-critical solutions across the product lifecycle.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtuslab%2Ftetrisly-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvirtuslab%2Ftetrisly-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtuslab%2Ftetrisly-react/lists"}