{"id":20613948,"url":"https://github.com/dgraph-io/typhoon-ui","last_synced_at":"2025-04-15T07:24:41.742Z","repository":{"id":47492946,"uuid":"357525173","full_name":"dgraph-io/typhoon-ui","owner":"dgraph-io","description":"🌀 typhoon-ui: Token-based React component library built using emotion.","archived":false,"fork":false,"pushed_at":"2023-07-19T06:31:52.000Z","size":1246,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-28T17:57:19.376Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dgraph-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-13T11:17:16.000Z","updated_at":"2024-07-10T12:23:48.000Z","dependencies_parsed_at":"2022-09-19T02:50:30.420Z","dependency_job_id":null,"html_url":"https://github.com/dgraph-io/typhoon-ui","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgraph-io%2Ftyphoon-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgraph-io%2Ftyphoon-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgraph-io%2Ftyphoon-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgraph-io%2Ftyphoon-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgraph-io","download_url":"https://codeload.github.com/dgraph-io/typhoon-ui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886334,"owners_count":21177645,"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-11-16T11:11:29.036Z","updated_at":"2025-04-15T07:24:41.719Z","avatar_url":"https://github.com/dgraph-io.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌀 typhoon-ui\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/dgraph-io/typhoon-ui/blob/main/LICENSE) [![node](https://img.shields.io/badge/node-10.14.6-brightgreen.svg)](https://github.com/dgraph-io/typhoon-ui) [![npm version](https://badge.fury.io/js/%40dgraph-io%2Ftyphoon-ui.svg)](https://badge.fury.io/js/%40dgraph-io%2Ftyphoon-ui)\n\n[➡ View Component Library](https://typhoon-ui.dgraph.io/?path=/story/atoms-avatar--default)\n\n\n[Note: This is a work in progress, API is subject to change]\n## Installation\n\n```\nnpm i @dgraph-io/typhoon-ui\n```\n\n## Design System Concepts\n\n### **Theme**\n\nTheme is just a map of tokens \u0026 components\n\n```\n{ tokens: { ... }, components: { ... }}\n```\n\nTheme can be accessed from `useTheme` hook, which gets access to theme object from the `ThemeContext`. You only need this while creating atoms or molecules.\n\n### **Tokens**\n\nTokens is a map of values which allow us to build a contraint based design. There is a mapping of CSS properties with the tokens, which can be found in `helpers/constants`. Every component in the design system is able to resolve the styles against these tokens. Lets see some examples -\n\nExample -\n\n1. `marginTop: 1`\n\n    Since `marginTop` is mapped to `tokens.space`\n\n    This will resolve to `marginTop: tokens.space[1]` =\u003e `marginTop: 8px`\n\n2. `background : \"pink.light\"`\n\n    Since `background` is mapped to `tokens.colors`\n\n    This will resolve to `background: tokens.colors.pink.light` =\u003e `background: #ffc0d6`\n\nEvery component in the design system is able to resolve the styles\n\n**Shortcuts**\n\nThere are shortcuts configured as well which are defined in `helpers/constants`\n\nExample -\n\n`marginX: ...`\n\nwill be resolved to -\n\n```\nmarginLeft: ... ,\nmarginRight: ...\n```\n\n**Advanced**\n\nWe can resolve tokens within a string as well like -\n\nExample-\n\n`border: {{lineThickness.1}} solid {{colors.pink.light}}`\n\nThis resolves to\n\n`border: {{lineThickness.1}} solid {{colors.pink.light}}`\n\nAny valid key between `{{ }}` will be resolved against token values.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgraph-io%2Ftyphoon-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgraph-io%2Ftyphoon-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgraph-io%2Ftyphoon-ui/lists"}