Using Exported Components

Once you’ve exported your components, you can use them in your React project. This section provides guides for integrating Exported Components with various frameworks, styling and theming, data and state integration, and best practices for usage.

Using Exported Components

1

Apply Webflow's design system globally

To apply Webflow’s design system globally, import the global.css file at the root of your application.

app/layout.tsx
1import { DevLinkProvider } from '@/devlink/DevLinkProvider';
2import '@/devlink/global.css';
2

Wrap your application in the DevLinkProvider component

Wrap your application in the DevLinkProvider component to ensure all exported components have access to Webflow interactions.

app/layout.tsx
1import { DevLinkProvider } from '@/devlink/DevLinkProvider';
2import '@/devlink/global.css';
3
4export default function RootLayout({
5 children,
6}: {
7 children: React.ReactNode;
8}) {
9 return (
10 <html lang="en">
11 <body>
12 {/* Wrap your application in the DevLinkProvider component */}
13 <DevLinkProvider>
14 {children}
15 </DevLinkProvider>
16 </body>
17 </html>
18 );
19}
4

Use the exported components

Now you can import and use your Webflow components in your application. This particular example uses three components exported from Webflow via DevLink: Hero, Card, and Button.

You can use them in your application:

app/page.tsx
1import { Button } from '@/devlink/Button';
2import { Card } from '@/devlink/Card';
3import { Hero } from '@/devlink/Hero';
4
5export default function Home() {
6 return (
7 <main>
8 <Hero />
9 <Card />
10 <Button />
11 </main>
12 );
13}
Always include the component name in the import

Always include the component name in the import. For example, import { Hero } from '@/devlink/Hero'; instead of import { Hero } from '@/devlink';.

Learn more