# SVG components example This example uses a custom `.babelrc` to add support for importing `.svg` files and rendering them as React components. [babel-plugin-inline-react-svg](https://www.npmjs.com/package/babel-plugin-inline-react-svg) is used to handle transpiling the SVGs. ## Deploy your own Deploy the example using [ZEIT Now](https://zeit.co/now): [![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/svg-components) ## How to use ### Using `create-next-app` Execute [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: ```bash npm init next-app --example svg-components svg-components-app # or yarn create next-app --example svg-components svg-components-app ``` ### Download manually Download the example: ```bash curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/svg-components cd svg-components ``` Install it and run: ```bash npm install npm run dev # or yarn yarn dev ``` Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.co/download)): ```bash now ```