This is an example app which shows how to create a custom reference field inside of a Contentful entry. In this app, we remove the default reference field and replace the experience with a custom card UI using Forma 36 as our component and layout library.
This app uses the Create Contentful App CLI tool to bootstrap the project. In it, we've focused on using the field location by creating a React component which makes calls to the Contentful API using the App SDK.
This app is based off a prototype we built on the Contentful developer live stream.
In the project directory, you can run:
Creates or updates your app definition in contentful, and runs the app in development mode. Open your app to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
To make your app look and feel like Contentful use the following libraries:
- Forma 36 – Contentful's design system
- Contentful Field Editors – Contentful's field editor React components
Read more and check out the video on how to use the CLI.
Create Contentful App uses Create React App. You can learn more in the Create React App documentation and how to further customize your app.