{"id":38027781,"url":"https://github.com/dgca/tosui","last_synced_at":"2026-02-26T09:32:51.716Z","repository":{"id":330336685,"uuid":"1122472701","full_name":"dgca/tosui","owner":"dgca","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-24T03:47:15.000Z","size":1033,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-24T09:49:07.643Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dgca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-12-24T20:05:44.000Z","updated_at":"2026-02-24T03:46:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dgca/tosui","commit_stats":null,"previous_names":["dgca/tosui"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/dgca/tosui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgca%2Ftosui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgca%2Ftosui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgca%2Ftosui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgca%2Ftosui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgca","download_url":"https://codeload.github.com/dgca/tosui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgca%2Ftosui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29853382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T22:37:40.667Z","status":"online","status_checked_at":"2026-02-26T02:00:06.774Z","response_time":89,"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":[],"created_at":"2026-01-16T19:36:22.328Z","updated_at":"2026-02-26T09:32:51.695Z","avatar_url":"https://github.com/dgca.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @tosui/react\n\nTosui is a themable, orderly, simple UI component library for React. It provides 40 components designed to help you build consistent, accessible user interfaces with minimal configuration.\n\n## Links\n\n- [Docs](https://dgca.github.io/tosui/)\n\n## Installation\n\n```bash\nnpm install @tosui/react\n# or\nyarn add @tosui/react\n# or\npnpm add @tosui/react\n```\n\n## Setup\n\nImport the base styles in your application entry point:\n\n```tsx\nimport \"@tosui/react/styles.css\";\n```\n\nOptionally, import IBM Plex font styles:\n\n```tsx\nimport \"@tosui/react/fonts.css\";\n```\n\n## Basic Usage\n\n```tsx\nimport { Box, Text, Heading, Button } from \"@tosui/react\";\n\nfunction App() {\n  return (\n    \u003cBox p={6}\u003e\n      \u003cHeading fontSize=\"3xl\" fontWeight=\"semibold\"\u003e\n        Welcome to Tosui\n      \u003c/Heading\u003e\n      \u003cText color=\"foreground-muted\"\u003e\n        A constraint-driven design system for React\n      \u003c/Text\u003e\n      \u003cButton\u003eGet Started\u003c/Button\u003e\n    \u003c/Box\u003e\n  );\n}\n```\n\n## Philosophy\n\nTosui is built on **constraint-driven simplicity**. By intentionally limiting options, we reduce decision fatigue, improve consistency, and make design systems easier to learn, implement, and maintain.\n\n### Core Principles\n\n1. **Fewer, Better Choices** - Every token earns its place. No 10 shades of every color or arbitrary size scales.\n\n2. **Composition Over Configuration** - Powerful primitives (Box, Text, Heading) compose naturally into complex components.\n\n3. **Semantic, Not Prescriptive** - Design values describe intent (`foreground`, `background`, `primary-default`), not measurements. Themes swap seamlessly.\n\n## Features\n\n- **40 components** covering primitives, layout, forms, navigation, feedback, data display, and overlays\n- **CSS Modules styling** with zero runtime CSS generation\n- **Responsive props** — all style props accept mobile-first breakpoint objects\n- **State styling** — `_hover`, `_focus`, `_active`, `_disabled` props on all style properties\n- **TypeScript-first** with full type safety and autocomplete\n- **Polymorphic components** that render as any HTML element\n- **Accessible** with proper ARIA attributes and keyboard navigation\n\n## Components\n\n### Primitives\nBox, Text, Heading\n\n### Layout\nStack, HStack, VStack, Flex, Grid, Container, Spacer, Divider\n\n### Forms\nButton, IconButton, Input, Textarea, Select, Checkbox, Radio, Switch, FormField, Label\n\n### Navigation\nLink, Breadcrumb, Tabs, Menu, Pagination\n\n### Feedback\nAlert, Badge, Progress, Spinner, Skeleton\n\n### Data Display\nAvatar, Card, Code, Image, List\n\n### Overlays\nModal, Tooltip, Popover, Accordion\n\n## Design Tokens\n\nTosui uses CSS variables for all design tokens. Key token categories:\n\n### Colors\n\n**Surface \u0026 Text**: `foreground`, `foreground-muted`, `foreground-subtle`, `background`, `surface`, `border`\n\n**Brand**: `primary-default`, `primary-emphasis`, `primary-subtle`, `accent-default`, `accent-emphasis`, `accent-subtle`\n\n**Feedback**: `success-*`, `warning-*`, `error-*`, `info-*` (each with default, emphasis, subtle variants)\n\n### Spacing\n\n4px base unit with multipliers 0-32. Use numeric values: `p={4}` = 16px padding.\n\n### Typography\n\n- **Sizes**: `xs` (12px) through `5xl` (48px)\n- **Weights**: `normal`, `medium`, `semibold`, `bold`\n- **Line heights**: `tight`, `normal`, `relaxed`\n- **Families**: `sans`, `serif`, `mono` (system stacks)\n\n### Border Radius\n\n`none`, `sm`, `md`, `lg`, `full`\n\n### Shadows\n\n`none`, `sm`, `md`, `lg`\n\n## Responsive Props\n\nTosui uses **mobile-first** breakpoints:\n\n| Key | Min Width |\n|-----|-----------|\n| `base` | 0px |\n| `sm` | 640px |\n| `md` | 768px |\n| `lg` | 1024px |\n| `xl` | 1280px |\n| `2xl` | 1536px |\n\nAll style props accept responsive objects:\n\n```tsx\n\u003cBox p={{ base: 2, md: 4, lg: 6 }}\u003e\n  Padding scales with viewport\n\u003c/Box\u003e\n```\n\n## Dark Mode\n\nColors automatically adapt to dark mode via:\n- System preference (`prefers-color-scheme: dark`)\n- Manual override (`data-theme=\"dark\"` on `\u003chtml\u003e`)\n\n## Theming\n\nOverride CSS variables to customize:\n\n```css\n:root {\n  --t-color-primary-default: #your-brand-color;\n  --t-spacing-unit: 8px; /* Change base spacing */\n}\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgca%2Ftosui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgca%2Ftosui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgca%2Ftosui/lists"}