Convert Figma logo to code with AI

DouyinFE logosemi-design

🚀A modern, comprehensive, flexible design system and React UI library. 🎨 Provide more than 3000+ Design Tokens, easy to build your design system. Make Semi Design to Any Design. 🧑🏻‍💻 Design to Code in one click

9,265
776
9,265
277

Top Related Projects

An enterprise-class UI design language and React UI library

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.

40,389

Chakra UI is a component system for building SaaS products with speed ⚡️

A utility-first CSS framework for rapid UI development.

90,409

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation

Bootstrap components built with React

Quick Overview

Semi Design is a modern, comprehensive design system and React component library developed by ByteDance's Douyin Frontend team. It offers a wide range of customizable UI components and design tokens, enabling developers to create consistent and visually appealing user interfaces for web applications.

Pros

  • Extensive component library with over 50 customizable UI components
  • Supports both light and dark themes out of the box
  • Provides design tokens for easy customization and theming
  • Built with TypeScript for improved type safety and developer experience

Cons

  • Documentation is primarily in Chinese, which may be challenging for non-Chinese speakers
  • Relatively new compared to more established React UI libraries
  • Limited community support and third-party resources compared to more popular alternatives

Code Examples

  1. Using a basic Button component:
import { Button } from '@douyinfe/semi-ui';

function MyComponent() {
  return <Button>Click me</Button>;
}
  1. Creating a simple Form with validation:
import { Form, Button } from '@douyinfe/semi-ui';

function MyForm() {
  const { Input } = Form;

  return (
    <Form onSubmit={values => console.log(values)}>
      <Input field="username" label="Username" rules={[{ required: true, message: 'Please enter your username' }]} />
      <Input field="password" label="Password" type="password" rules={[{ required: true, message: 'Please enter your password' }]} />
      <Button htmlType="submit">Submit</Button>
    </Form>
  );
}
  1. Implementing a Modal dialog:
import { Modal, Button } from '@douyinfe/semi-ui';
import { useState } from 'react';

function MyModal() {
  const [visible, setVisible] = useState(false);

  return (
    <>
      <Button onClick={() => setVisible(true)}>Open Modal</Button>
      <Modal
        title="Example Modal"
        visible={visible}
        onOk={() => setVisible(false)}
        onCancel={() => setVisible(false)}
      >
        <p>This is the content of the modal</p>
      </Modal>
    </>
  );
}

Getting Started

To start using Semi Design in your React project, follow these steps:

  1. Install the package:
npm install @douyinfe/semi-ui
  1. Import and use components in your React application:
import React from 'react';
import { Button } from '@douyinfe/semi-ui';

function App() {
  return (
    <div>
      <h1>Welcome to my app!</h1>
      <Button>Click me</Button>
    </div>
  );
}

export default App;
  1. (Optional) Import the default CSS styles:
import '@douyinfe/semi-ui/dist/css/semi.min.css';

Now you're ready to use Semi Design components in your React application!

Competitor Comparisons

An enterprise-class UI design language and React UI library

Pros of Ant Design

  • Larger community and ecosystem, with more third-party components and resources
  • More comprehensive documentation and examples
  • Longer track record and established reputation in the industry

Cons of Ant Design

  • Larger bundle size, which may impact performance for smaller projects
  • Less flexibility in customization compared to Semi Design
  • Steeper learning curve due to its extensive feature set

Code Comparison

Semi Design:

import { Button } from '@douyinfe/semi-ui';

function App() {
  return <Button theme="solid">Click me</Button>;
}

Ant Design:

import { Button } from 'antd';

function App() {
  return <Button type="primary">Click me</Button>;
}

Additional Notes

Semi Design is a newer project developed by ByteDance (TikTok's parent company), focusing on modern design principles and flexibility. It offers a fresh approach to UI components with a focus on customization and performance.

Ant Design, maintained by Ant Group, is a more established and widely adopted UI library. It provides a comprehensive set of components and has been battle-tested in numerous large-scale applications.

Both libraries offer React-based UI components, but Semi Design may be more suitable for projects requiring a modern look and greater customization, while Ant Design excels in providing a complete enterprise-level solution with extensive documentation and community support.

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.

Pros of Material-UI

  • Larger community and ecosystem, with more third-party components and resources
  • More comprehensive documentation and examples
  • Better TypeScript support and type definitions

Cons of Material-UI

  • Steeper learning curve due to its extensive API and customization options
  • Larger bundle size, which may impact performance in some applications
  • More opinionated design system, which can be limiting for custom designs

Code Comparison

Material-UI:

import { Button, TextField } from '@mui/material';

<Button variant="contained" color="primary">
  Click me
</Button>
<TextField label="Enter text" variant="outlined" />

Semi Design:

import { Button, Input } from '@douyinfe/semi-ui';

<Button theme="solid" type="primary">
  Click me
</Button>
<Input placeholder="Enter text" />

Both libraries offer similar component APIs, but Material-UI provides more customization options out of the box. Semi Design's API is generally simpler and more straightforward, which can lead to faster development for some projects.

While Material-UI has a larger ecosystem and more resources, Semi Design offers a fresh alternative with a focus on simplicity and performance. The choice between the two depends on project requirements, design preferences, and development team familiarity.

40,389

Chakra UI is a component system for building SaaS products with speed ⚡️

Pros of Chakra UI

  • More extensive documentation and community support
  • Greater flexibility and customization options
  • Better accessibility features out of the box

Cons of Chakra UI

  • Steeper learning curve for beginners
  • Larger bundle size compared to Semi Design
  • Less opinionated design system, requiring more decisions from developers

Code Comparison

Semi Design:

import { Button } from '@douyinfe/semi-ui';

function App() {
  return <Button>Click me</Button>;
}

Chakra UI:

import { Button } from '@chakra-ui/react';

function App() {
  return <Button>Click me</Button>;
}

Both libraries offer similar component usage, but Chakra UI provides more prop options for customization:

<Button colorScheme="blue" size="lg" variant="outline">
  Click me
</Button>

Semi Design focuses on predefined styles:

<Button type="primary" size="large">
  Click me
</Button>

Overall, Chakra UI offers more flexibility and customization options, while Semi Design provides a more opinionated and streamlined approach to UI development. The choice between the two depends on project requirements and developer preferences.

A utility-first CSS framework for rapid UI development.

Pros of Tailwind CSS

  • Highly customizable and flexible utility-first CSS framework
  • Extensive documentation and large community support
  • Smaller file sizes due to purging unused styles

Cons of Tailwind CSS

  • Steeper learning curve for developers new to utility-first CSS
  • Can lead to cluttered HTML with many utility classes
  • Requires additional configuration for optimal performance

Code Comparison

Semi Design (React component):

import { Button } from '@douyinfe/semi-ui';

function App() {
  return <Button>Click me</Button>;
}

Tailwind CSS (HTML with utility classes):

<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
  Click me
</button>

Semi Design focuses on providing pre-built React components with consistent styling, while Tailwind CSS offers utility classes for building custom designs. Semi Design is more suitable for rapid development with a consistent look, whereas Tailwind CSS provides greater flexibility for unique designs at the cost of more verbose HTML.

90,409

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation

Pros of Storybook

  • Widely adopted and supported by a large community
  • Framework-agnostic, supporting multiple UI libraries and frameworks
  • Extensive documentation and ecosystem of addons

Cons of Storybook

  • Steeper learning curve for beginners
  • Can be complex to set up and configure for advanced use cases

Code Comparison

Semi-design component usage:

import { Button } from '@douyinfe/semi-ui';

function App() {
  return <Button>Click me</Button>;
}

Storybook story example:

import { Button } from './Button';

export default {
  title: 'Example/Button',
  component: Button,
};

export const Primary = () => <Button primary>Button</Button>;

Summary

Semi-design is a React-based UI library with a focus on simplicity and ease of use. It provides a set of pre-built components that can be quickly integrated into projects.

Storybook, on the other hand, is a development environment for UI components. It allows developers to build, test, and document components in isolation, supporting various frameworks and libraries.

While Semi-design offers a more straightforward approach for React developers, Storybook provides a more flexible and powerful toolset for component-driven development across different technologies.

Bootstrap components built with React

Pros of react-bootstrap

  • Mature and well-established library with a large community and extensive documentation
  • Seamless integration with Bootstrap's CSS framework, providing a familiar look and feel
  • Lightweight and focused on React components for Bootstrap, without additional design systems

Cons of react-bootstrap

  • Limited to Bootstrap's design system, which may not be suitable for more modern or custom UI requirements
  • Less frequent updates and potentially slower adoption of new features compared to Semi Design
  • Requires separate installation and management of Bootstrap CSS

Code Comparison

Semi Design:

import { Button } from '@douyinfe/semi-ui';

function App() {
  return <Button theme="solid">Click me</Button>;
}

react-bootstrap:

import Button from 'react-bootstrap/Button';

function App() {
  return <Button variant="primary">Click me</Button>;
}

Both libraries offer similar component-based approaches, but Semi Design provides a more modern and customizable design system, while react-bootstrap closely follows Bootstrap's conventions.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Semi-UI

A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps.

Twitter Follow

LICENSE NPM CONTRIBUTORS Design Token FIGMA CODECOV Chromatic Cypress

English | 简体中文

🎉 Features

  • 💪 Up to 70+ high-quality Components. Stable updates since 2019
  • 🚀 Official Design to Code (D2C) support, convert Figma draft to real code in a few seconds
  • 💅 Code to Design (C2D), automatically generate Figma UI Kit according to different themes, keep consistency between design and code
  • 💕 Complete A11y support, follows W3C standards to provide keyboard interaction, focus management and ARIA for all components
  • 💅 Design system management Semi DSM, up to 3000+ Design Tokens, make Semi Design to Any Design quickly.
  • 🌍 Internationalization Support for Dozens of Languages, timezone, and RTL support
  • ⚙️ Strict quality assurance, covering unit testing, E2E testing, and visual testing.
  • 👏 Written in Typescript, friendly Static Type Support. Based on Foundation/Adapter architecture, easy to read and contribute
  • 🥳 SSR (Server Side Rendering) Compatible.
  • 📦 Easily compatible with web components, providing a complete adaptation solution, more suitable for building SDKs, browser plugins and other scenarios that require DOM isolation.

🔥 Install

npm install @douyinfe/semi-ui
yarn add @douyinfe/semi-ui
pnpm add @douyinfe/semi-ui

👍 Component Usage

Here is a quick example to get you started, it's all you need:

import React from 'react';
import { createRoot } from 'react-dom/client';
import { Button, Form } from '@douyinfe/semi-ui';

const App = () => (
    <Form>
        <Form.Input field='name' initValue='semi design'></Form.Input>
        <Button htmlType='submit'>submit</Button>
    </Form>
);

const root = createRoot(document.querySelector('#app'));

root.render(<App />);

Semi UI Doc Site has hundreds of editable examples and live preview, welcome to play with those examples.

⚡️ Design to Code Usage

Install Semi Figma Plugin. Translate Figma to real code in seconds. Support multiple output formats: JSX + SCSS / Emotion/Tailwind, or JSON Schema DSL

  • Support Figma devmode, selecting a layer, directly get corresponding code on the right

design2code

  • Or jump to codesandbox to continue editing

codesandboxdemo

🎨 DSM Usage

Define your own design system based on Semi UI with DSM in one click, Provide more than 3000 tokens for you to configure every detail. Sync between Figma and Code always.

dsmintro

📰 News about Semi UI

📌 Documentation

📝 Blogs

👌 Platform Support

Semi UI supports all major modern browsers.

chrome
chrome
firefox
firefox
safari
safari
IE/Edge
IE/Edge
electron
Electron
latest 2 versionslatest 2 versionslatest 2 versionsEdgelatest 2 versions

👨‍👨‍👧‍👦 User Group

Join User Group on Feishu / Lark

💖 Thanks

Chromatic

Thanks to Chromatic for providing the visual testing platform that helps us review UI changes and catch visual regressions.

Cypress

Thanks to Cypress for providing E2E testing.

Thanks to VisActor for providing the data visualization solution.

👐 Contributing

Thanks to all the people who already contributed!

Read the contributing guide to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes to Semi UI.

See CONTRIBUTING documentation.

🎈 License

Semi UI is MIT Licensed

NPM DownloadsLast 30 Days