Integrate Navigation Links
Navigation links are often best as minimal, structured data that your team mates can edit with a form interface.
Model definition
A structured data model named navigation-links is all you need, with a couple fields:
| name | type | notes |
|
| with subfields:
|
Example Code
Be sure to add use client to your builder.tsx:
Create a page, for example in app/[...page]/page.tsx, with the following contents, replacing YOUR_PUBLIC_API_KEY with your account's Public API Key:
Be sure to add use client to your builder.tsx:
Want the latest and greatest of Remix with Builder? We recommend using Gen 2.
Want the latest and greatest of Hydrogen with Builder? We recommend using Gen 2.
Add the following to nuxt.config.js:
If you are using an SSR framework other than Nuxt, you must import the CSS by adding the following to your entry point, before rendering Builder content:
This example uses NavBarComponent and NavLinksComponent.
Create another standalone component NavLinksComponent:
This example uses NavBarComponent and NavLinksComponent.
Fetch your links data from Builder's Content API. Then use that data to create a nav bar within your app's page template.
The example below uses Express.js. Replace YOUR_API_KEY with your account's Public API Key: