Start · Quick Start
Quick Start
Semi Design is maintained by the Douyin front-end team and provides 70+ ready-to-use React components and the Figam Variant UI Kit. You can import and use it in any React project (new projects are recommended to be created via Rsbuild, CreateReactApp, or Vite). Currently, it supports React v16, v17, v18, and v19 (React v19 adaptation).
For compile-time customization such as prefixCls, themes, and CSS Layers, use the Semi plugin for your build tool. Webpack, Rspack/Rsbuild, and Vite are supported; see Customize Theme and With TailwindCSS. (For ByteDance users, if you are using your company's internal engineering solution, please refer to the Lark documentation for configuration: Semi Engineering FAQ)
React Version Compatibility
React 16, 17, 18, and 19 all use the same package, @douyinfe/semi-ui. React 19 projects must import @douyinfe/semi-ui/react19-adapter in the application entry before using Semi components; there is no need to install @douyinfe/semi-ui-19. See the React 19 guide for migration steps and limitations.

1. Install Library

2. Use components in a modular way 💫

Semi provides esm format dist, and the css of the component is only imported by the corresponding js.
With the default theme, Webpack, Rspack, create-react-app, and Vite projects generally do not need a Semi-specific build plugin. For theme customization or Tailwind layers, follow the build configuration in the corresponding guide. All related resources are packaged on-demand at build process. Tree shaking will work without additional configuration.
For React 19, add the following import to your application entry before using any Semi components. React 16/17/18 projects do not need this import:
Then import components from @douyinfe/semi-ui as usual:
If your project does not already have a CSS reset, consider reset.css to reduce differences between browser defaults. If Tailwind CSS Preflight is enabled, an additional reset.css is usually unnecessary; avoid applying redundant resets. If Preflight is disabled, choose a reset strategy appropriate for your project. See With TailwindCSS for style priority configuration.

On-demand loading and automatic imports

On-demand loading is different from omitting import statements in source code. The explicit imports above allow your build tool to perform tree shaking; an automatic import plugin is not required for on-demand bundling.
Official build plugins such as @douyinfe/semi-vite-plugin and @douyinfe/semi-webpack-plugin handle themes, CSS prefixes, and styles; they do not generate imports for Button, Toast, or other JSX components, or provide a component auto-import resolver. This guide recommends keeping explicit imports and using your editor's auto-import feature. If you choose a third-party tool, configure it according to its React/JSX support.

3. Use in Next.js

  • If you only use the default theme, you can add Semi-related packages to transpilePackages (Next.js version requires >= v13.1) .
  • If you need to use a custom theme package or the version of Next.js is lower than v13.1, you need to use the compiling plugin @douyinfe/semi-next provided by Semi
    • First install the plugin npm i @douyinfe/semi-next (if you use yarn or pnpm, please replace it with the equivalent command)
    • Configured in next.config.js, the plugin will remove the default import CSS statement of the component. More configurations can be found @douyinfe/semi-nextDetail Config
    • import semi css in global.css (using this method in Next.js does not support on-demand import)
How to use theme packages with Next.js
You need to change the path of the import statement in globals.css, and replace the default theme CSS product with the CSS product in your customized theme package.
For example, when you want to use the theme package of the Douyin creation service platform @semi-bot/semi-theme-doucreator

4. Use in Remix

  • @remix related package version requirements > 1.11.0, and install @remix-run/css-bundle
  • Configure remix.config.js, refer to Remix Css Side-Effect Imports. Turn on unstable_cssSideEffectImports, and configure Semi related packages in serverDependenciesToBundle.
  • Configure in root.tsx,refer to Remix CSS Bundling. Import cssBundleHref and configure links
  • After completing the configuration, you can use Semi components normally
How to use theme packages with Remix
You can directly replace the cssBundleHref step with importing the built full css product in the theme package to replace the default theme css).
For example, when you want to apply the theme package @semi-bot/semi-theme-doucreator of the Douyin creation service platform Time

5. Use UMD import in browser

BUILD-JS BUILD-CSS
We do not recommend using the built file directly, as this will introduce all components in full and cannot be loaded on demand. But if there is indeed a need for non-construction scenarios, you can quote in the following ways
Use script and link tags to import files directly in the browser, and use the global variable SemiUI、SemiIcons、SemiIllustrations
  1. Please make sure you have import react and react-dom in advance
  2. Import the JS file, the following example URL 2.27.0 is the version identifier, if you want to use a different version of Semi, just replace the corresponding value in version
  1. Import the CSS style file of the Semi default theme