https://github.com/builderio/react-design-system-demo
https://github.com/builderio/react-design-system-demo
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/builderio/react-design-system-demo
- Owner: BuilderIO
- Created: 2020-09-21T15:56:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-21T16:27:58.000Z (over 5 years ago)
- Last Synced: 2025-06-30T11:50:01.395Z (12 months ago)
- Language: JavaScript
- Size: 163 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Builder.io custom design system example with React
> ✨ **Try it live [here](https://builder.io/fiddle/4b2e0a2e4b1a44a88a5e6f8c46cdfe7c)**!
In this example we show how to integrate react components with [Builder.io](https://builder.io). This is useful when you want to add the ability for your team to utilize custom components on the pages you build using the Builder editor, or even want to make it so people on your team can only build and edit your site's pages using your custom components.
> ⚛️ For serve side rendered examples see our [Next.js](https://github.com/BuilderIO/builder/tree/master/examples/next-js) and [Gatsby](https://github.com/BuilderIO/gatsby-starter-builder) examples
The source code for the custom components used in this demo are [here](src/components), and you can see how they are registered with Builder by looking at the files that end in `*.builder.js` ([this is an example](https://github.com/BuilderIO/builder/blob/master/examples/react-design-system/src/components/ProductsList/ProductsList.builder.js)). The logic for adding components to the Builder editor menu can be found [here](https://github.com/BuilderIO/builder/blob/master/examples/react-design-system/src/builder-settings.js)
> 👉**Tip:** want to limit page building to only your components? Try [components only mode](https://builder.io/c/docs/guides/components-only-mode)

### To run the example Locally
- [Sign in or create an account](https://builder.io)
- Create a new page
- Clone and start the project:
```bash
git clone git@github.com:BuilderIO/react-design-system-demo.git
npm install
npm run start
```
- Now that you have the development server running on localhost, update the preview URL of the Builder.io entry you created to : `http://localhost:3000/home`

This will allow Builder to read in all your custom component logic and allow your team to edit and build using your components.
When you deploy this to a live or staging environment, you can change the preview URL for your model globally from [builder.io/models](https://builder.io/models) (see more about models [here](https://builder.io/c/docs/guides/getting-started-with-models) and preview urls [here](https://builder.io/c/docs/guides/preview-url))