npm

Need private packages and team management tools?Check out npm Orgs. »

gatsby-plugin-antd

2.1.0 • Public • Published

npm package

gatsby-plugin-antd

Use Ant Design with Gatsby

Install

npm install antd gatsby-plugin-antd --save

How to use

  1. Include the plugin in your gatsby-config.js file.
// in gatsby-config.js
plugins: [
  'gatsby-plugin-antd'
]
// or if you want to use less
plugins: [
  {
      resolve: 'gatsby-plugin-antd',
      options: {
        style: true
      }
  }
]

note: if you are using less then you need to install less

  1. In your component(s) include the Ant Design component using dynamic imports as suggested here https://ant.design/docs/react/getting-started#Import-on-Demand
// in your component
import { Button } from 'antd'
 
export default () => <Button type="primary">Primary</Button>
  1. It will pull in the component and the relevant css file using babel-plugin-import

install

npm i gatsby-plugin-antd

Downloadsweekly downloads

2,395

version

2.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability