Socket
Socket
Sign inDemoInstall

antd

Package Overview
Dependencies
75
Maintainers
7
Versions
821
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    antd

An enterprise-class UI design language and React components implementation


Version published
Weekly downloads
1.4M
increased by11.35%
Maintainers
7
Install size
66.7 MB
Created
Weekly downloads
 

Package description

What is antd?

The antd npm package is a UI design language and React UI library that provides a lot of out-of-the-box components and tools to help developers build user interfaces efficiently. It is widely used for enterprise-level applications and admin UIs due to its comprehensive set of components and professional look.

What are antd's main functionalities?

Layout

Provides a set of components to create a layout structure for your application, including headers, footers, sidebars, and content areas.

import { Layout } from 'antd';
const { Header, Footer, Sider, Content } = Layout;

ReactDOM.render(
  <Layout>
    <Header>Header</Header>
    <Layout>
      <Sider>Sider</Sider>
      <Content>Content</Content>
    </Layout>
    <Footer>Footer</Footer>
  </Layout>,
  document.getElementById('container')
);

Data Display

Includes components like tables, lists, and cards to display data in a structured format.

import { Table } from 'antd';

const dataSource = [
  { key: '1', name: 'John Doe', age: 32, address: 'Some Street' },
  { key: '2', name: 'Jane Doe', age: 42, address: 'Another Street' }
];

const columns = [
  { title: 'Name', dataIndex: 'name', key: 'name' },
  { title: 'Age', dataIndex: 'age', key: 'age' },
  { title: 'Address', dataIndex: 'address', key: 'address' }
];

ReactDOM.render(<Table dataSource={dataSource} columns={columns} />, document.getElementById('container'));

Form Controls

Provides form components like input fields, checkboxes, radio buttons, and forms with validation.

import { Form, Input, Button } from 'antd';

const FormComponent = () => (
  <Form>
    <Form.Item label='Username' name='username'>
      <Input />
    </Form.Item>
    <Form.Item label='Password' name='password'>
      <Input.Password />
    </Form.Item>
    <Form.Item>
      <Button type='primary' htmlType='submit'>Submit</Button>
    </Form.Item>
  </Form>
);

ReactDOM.render(<FormComponent />, document.getElementById('container'));

Feedback

Offers feedback components such as alerts, modals, notifications, and messages to interact with users.

import { message } from 'antd';

function success() {
  message.success('This is a success message');
}

ReactDOM.render(<button onClick={success}>Show success message</button>, document.getElementById('container'));

Navigation

Includes navigation components like menus, tabs, breadcrumbs, and paginations to guide users through the application.

import { Menu } from 'antd';

const { SubMenu } = Menu;

ReactDOM.render(
  <Menu mode='horizontal'>
    <Menu.Item key='mail'>Navigation One</Menu.Item>
    <SubMenu title='Navigation Two'>
      <Menu.Item key='submenu-item-1'>Option 1</Menu.Item>
      <Menu.Item key='submenu-item-2'>Option 2</Menu.Item>
    </SubMenu>
  </Menu>,
  document.getElementById('container')
);

Other packages similar to antd

Readme

Source

Ant Design

An enterprise-class UI design language and React UI library.

CI status codecov NPM version NPM downloads

FOSSA Status

Follow Twitter Renovate status dumi Issues need help

Changelog · Report Bug · Request Feature · English · 中文

Performance Stats of ant-design/ant-design - Last 28 days

✨ Features

  • 🌈 Enterprise-class UI designed for web applications.
  • 📦 A set of high-quality React components out of the box.
  • 🛡 Written in TypeScript with predictable static types.
  • ⚙️ Whole package of design resources and development tools.
  • 🌍 Internationalization support for dozens of languages.
  • 🎨 Powerful theme customization based on CSS-in-JS.

🖥 Environment Support

  • Modern browsers
  • Server-side Rendering
  • Electron
Edge
Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Electron
Electron
Edgelast 2 versionslast 2 versionslast 2 versionslast 2 versions

📦 Install

npm install antd
yarn add antd
pnpm add antd

🔨 Usage

import { Button, DatePicker } from 'antd';

export default () => (
  <>
    <Button type="primary">PRESS ME</Button>
    <DatePicker placeholder="select date" />
  </>
);

⌨️ Development

Use Gitpod, a free online dev environment for GitHub.

Open in Gitpod

Or use opensumi.run, a free online pure front-end dev environemt.

opensumi.run

Or clone locally:

$ git clone git@github.com:ant-design/ant-design.git
$ cd ant-design
$ npm install
$ npm start

Open your browser and visit http://127.0.0.1:8001 , see more at Development.

🤝 Contributing PRs Welcome

Active Contributors of ant-design/ant-design - Last 28 days

Let's build a better antd together.

We welcome all contributions. Please read our Contributing Guide first. You can submit any ideas as Pull Requests or as GitHub Issues. If you'd like to improve code, check out the Development Instructions and have a good time! :)

If you are a collaborator, please follow our Pull Request Principle to create a Pull Request with our Pull Request Template.

Let's fund issues in this repository

❤️ Sponsors and Backers

Keywords

FAQs

Last updated on 22 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc