@bigtablet/design-system

中文文档
4.6.0发布于 2026/11/06SEE LICENSE IN LICENSETypeScriptES Module零依赖构建来源已验证近 30 天下载 5029

Bigtablet Design System UI Components

原始使用文档
文档目录11 节
  1. Bigtablet Design System
  2. What's inside
  3. Install
  4. Providers
  5. Components
  6. Design tokens
  7. Tailwind CSS (v4)
  8. Vanilla JS
  9. Development
  10. Documentation
  11. License
Bigtablet Design System

Bigtablet Design System

The unified UI library powering Bigtablet products.
Crafted for clarity. Built on tokens. Ships with dark mode.


npm license ci

Documentation  ·  Storybook  ·  NPM  ·  🇰🇷 한국어


import { ThemeProvider, Button, Modal, useToast } from "@bigtablet/design-system";
// No CSS import needed - each component brings its own CSS plus the shared theme variables,
// so a page that uses only Button ships about 3 kB of DS CSS (gzip) instead of 20 kB.
// Next.js with webpack: add the package to `experimental.optimizePackageImports` (Turbopack needs nothing).

export default function App() {
  const toast = useToast();
  return (
    <ThemeProvider>
      <Button onClick={() => toast.success("Saved")}>Save</Button>
    </ThemeProvider>
  );
}

A complete React + TypeScript design system maintained by Bigtablet for internal product work. Open-sourced for reference - external use welcome, but minor versions may include breaking changes.


What's inside

  • 40+ components across forms, display, feedback, navigation, overlay, and layout
  • 13 token domains - colors, typography, spacing, motion, radius, elevation, and more - exposed as SCSS variables and CSS custom properties (plus a SCSS-only layout domain)
  • Light + dark mode out of the box. [data-theme="dark"] or prefers-color-scheme, no theme provider required (but available via ThemeProvider for runtime toggling)
  • Vanilla JS bundle for non-React backends - Thymeleaf, JSP, PHP, Django
  • Accessibility tested with axe-core in CI · keyboard nav · ARIA throughout

Install

pnpm add @bigtablet/design-system react@^19 react-dom@^19 lucide-react

Requires React 19 + lucide-react ≥ 0.552. Next.js is an optional peer dependency at >=15.

One-line setup - auto-detect package manager + framework
curl -fsSL https://raw.githubusercontent.com/Bigtablet/bigtablet-design-system/main/scripts/setup.sh | sh

Detects npm / yarn / pnpm / bun and React / Next.js, installs deps, prints CSS + provider setup steps.


Providers

import { ThemeProvider, AlertProvider, ToastProvider } from "@bigtablet/design-system";

<ThemeProvider>
  <AlertProvider>
    <ToastProvider>{children}</ToastProvider>
  </AlertProvider>
</ThemeProvider>

Use the hooks anywhere:

const toast = useToast();
const { showAlert } = useAlert();

toast.success("Saved");
showAlert({ title: "Delete?", showCancel: true, onConfirm: ... });

Components

FormsButton · IconButton · CopyButton · TextField · Textarea · Checkbox · Radio · RadioGroup · SegmentedControl · Toggle · Dropdown · FilterBar · DatePicker · DateCalendar · FileInput · ImageCropper · OtpInput
DisplayCard · MediaCard · Hero · Avatar · Badge · Chip · ListItem · Table · Divider · Icon · Accordion
FeedbackAlert · Toast · InlineAlert · Spinner · TopLoading · LinearProgress · Skeleton · EmptyState · ErrorState
NavigationTabs · Sidebar · BottomNav · NavBar · Breadcrumb · Menu · Pagination
OverlayModal · Drawer · Tooltip · Popover
LayoutContainer · Section · Stack · Grid
SystemThemeProvider

→ Full API · docs/COMPONENTS.md


Design tokens

@use "@bigtablet/design-system/scss/token" as token;

.card {
  background: token.$color_bg_solid;
  color: token.$color_text_heading;
  padding: token.$spacing_16;
  border-radius: token.$radius_md;
  box-shadow: token.$elevation_level1;
}
/* from @bigtablet/design-system/style.css */
.card {
  background: var(--bt-color-bg-solid);
  color: var(--bt-color-text-heading);
  border: 1px solid var(--bt-color-border-default);
  box-shadow: var(--bt-elevation-level1);
}

The React entry's style.css only emits --bt-color-*, --bt-elevation-*, --bt-focus-*, --bt-sidebar-*, --bt-bottom-nav-*, --bt-bottom-inset*, --bt-scrollbar-width, --bt-z-*, --bt-radius-*, --bt-spacing-*, --bt-font-family. Font size and line height are SCSS-only on this entry - use the scss/token typography mixins (--bt-font-size-* exists only in the Vanilla bundle).

colors · spacing · typography · radius · elevation · motion · z-index · breakpoints · border-width · opacity · skeleton · icon · a11y · layoutSCSS only


Tailwind CSS (v4)

/* app/globals.css - import before tailwindcss so the layer order is fixed first */
@import "@bigtablet/design-system/tailwind.css";
@import "tailwindcss";
import "@bigtablet/design-system/style.css"; // defines the --bt-* values
<p className="text-bt-text-heading shadow-bt-level2 dark:bg-bt-bg-solid" />

tailwind.css maps every --bt-color-* to --color-bt-*, --bt-elevation-* / --bt-focus-ring* to --shadow-bt-*, --bt-radius-* to --radius-bt-* (rounded-bt-md), --bt-spacing-* to --spacing-bt-* (p-bt-16) and --bt-font-family to --font-bt (font-bt) (values stay var(), so dark mode and your overrides follow), and makes dark: match ThemeProvider (data-theme="dark", or OS dark when data-theme is unset). Component CSS lives in the bigtablet cascade layer (theme, base, reset, bigtablet, components, utilities), so utilities and your own unlayered CSS override it without specificity fights: <Button className="bg-bt-text-brand" />. Element-selector resets of your own (* { padding: 0 }, button { background: none }) and global focus styles (:focus-visible { outline: 2px solid ... }) must go in @layer reset { ... } - unlayered, they beat every DS component, and a global :focus-visible outline is drawn on top of the DS focus ring (a double ring).


Vanilla JS

For server-rendered apps (Thymeleaf, JSP, PHP, Django):

<link rel="stylesheet" href="https://unpkg.com/@bigtablet/design-system/dist/vanilla/bigtablet.min.css">
<script src="https://unpkg.com/@bigtablet/design-system/dist/vanilla/bigtablet.min.js"></script>

<button class="bt-button bt-button--md bt-button--filled">Filled</button>

→ Full guide · docs/VANILLA.md


Development

pnpm install
pnpm storybook        # localhost:6006
pnpm test             # Vitest unit
pnpm test:storybook   # a11y + Playwright
pnpm build            # tsup + SCSS copy

The published Storybook lives at bigtablet.github.io/bigtablet-design-system and redeploys from main.


Documentation

📚 ComponentsProps API + usage per component
🔄 MigrationDeprecated prop migration guide
🎨 ThemingLight/dark theme system guide
🏗️ ArchitectureProject structure + design principles
🤝 ContributingDev setup + workflow
🧪 TestingTest patterns + a11y testing
🌐 Vanilla JSHTML/CSS/JS integration

License

Licensed under the Bigtablet License.


Made with care by the Bigtablet team.

GitHub · Issues · NPM

版本与发布记录

@bigtablet/design-system 共发布 170 个版本,首次发布于 2025/11/06;过去 12 个月发布了 164 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
4.6.0latest2026/11/062 天前
4.5.02026/11/053 天前
4.4.02026/11/035 天前
4.3.02026/10/309 天前
4.2.02026/10/2910 天前
4.1.02026/10/2712 天前

关于 @bigtablet/design-system 的常见问题

@bigtablet/design-system 是什么?

Bigtablet Design System UI Components

如何安装 @bigtablet/design-system?

在项目目录运行 npm install @bigtablet/design-system,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^19)、react-dom(^19)、lucide-react(>=0.552.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@bigtablet/design-system 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@bigtablet/design-system 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@bigtablet/design-system 可以商用吗?

@bigtablet/design-system 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@bigtablet/design-system 的下载量有多少?

根据 npm 官方下载统计,@bigtablet/design-system 在 2026/10/08 – 2026/11/06 这 30 天内被下载 5,029 次,日均约 168 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bigtablet/design-system 还在维护吗?

最新版本 4.6.0 发布于 2026/11/06(2 天前);至今共发布 170 个版本,其中过去 12 个月发布了 164 个;首次发布于 2025/11/06。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。