For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
GuidesChangelog
GuidesChangelog
    • DevLink
  • Quickstarts
    • Importing components
    • Exporting components
    • Webflow Cloud
  • Exporting components
    • Setup
    • What's exported
    • Design guidelines
    • Fonts
    • Usage
    • Troubleshooting
    • Resources
  • Reference
    • Webflow CLI
    • Migrating to DevLink Export
LogoLogo
Resources
Get started
On this page
  • Getting started with DevLink
  • 1. Install the Webflow CLI
  • 2. Create a Webflow site
  • 3. Create an app
  • 4. Create a Webflow Cloud app and environment
  • 5. Add your Webflow design system to your Webflow Cloud app
  • Next steps
  • Troubleshooting
Quickstarts

Getting started with DevLink

Scaffold an app locally, sync a Webflow site's design system with DevLink, and deploy it to Webflow Cloud.
Was this page helpful?
Previous

DevLink Export

Design in Webflow, export to React
Next
Built with

In this guide, you’ll use the Webflow CLI to create an Astro or Next.js app, sync a Webflow site’s design system with DevLink, and deploy the app to Webflow Cloud. Use this workflow when you want to scaffold locally and work with exported Webflow styles, variables, and components. If you already have a Next.js or Astro app, see Bring your own app.

Time Estimate: 30 minutes

Prerequisites:

  • A Webflow account
  • A GitHub account and basic familiarity with GitHub
  • Node.js 22.0.0 or higher and npm installed

Getting started with DevLink

1. Install the Webflow CLI

In your terminal, run the following command to install the CLI globally:

$npm install -g @webflow/webflow-cli

You can run the command webflow --version to verify that the CLI installed successfully.

2. Create a Webflow site

Create a Webflow site by cloning the Astral Fund template. This site is pre-configured with styles, variables, and components optimized for Webflow Cloud and DevLink.

  1. Open the Astral Fund template.
  2. Click Clone in Webflow and in the next window click Create site.
  3. Give the site a name and specify who should have access to it. Remember the site’s name because you’ll need it to connect the Webflow Cloud application to it. The new site opens in Webflow.
  4. Optionally, review the styles, variables, and components included in the site. You will export these styles and components to your new app in the following steps.

The template site looks like this:

Webflow site

3. Create an app

In these steps, you use the Webflow CLI to create an Astro or Next.js application. The CLI generates an app scaffold that’s synced with your Webflow site’s design system through DevLink.

The following steps walk you through this CLI setup:

Webflow CLI
  1. Start creating the app by running this command:

    $webflow cloud init
  2. At the Where do you want to deploy this app? prompt, select Existing site.

    The default option is New domain, which creates a standalone app that is not attached to any Webflow site. For this guide, choose Existing site so the app can use components from the site you cloned in the previous step.

  3. At the Which framework would you like to use? prompt, select astro or nextjs.

  4. At the What would you like to name your app? prompt, enter a name such as my-webflow-cloud-app.

  5. At the What path do you want to use locally? prompt, enter the mount path for the application (default: /app). For example, if you specify the mount path /app, Webflow Cloud hosts the application at mysite.webflow.io/app, where mysite.webflow.io is the URL of the Webflow site.

  6. If you are not already authenticated, the CLI opens a browser window for you to log in to Webflow. After you grant access, return to your terminal.

  7. At the Search for a Webflow site: prompt, search for and select the template site that you cloned in the previous section. The CLI then scaffolds the app and syncs the site’s components into it via DevLink.

    If your workspace has only one Webflow site, the CLI skips this prompt and uses that site automatically.

  8. Push the app to a GitHub repository. For more information, see Adding locally hosted code to GitHub.

Run this step non-interactively (for CI/CD)

You can skip all prompts by passing the required flags up front. See the webflow cloud init reference for the full list of options.

$webflow cloud init \
> --no-input \
> -n my-webflow-cloud-app \
> -f astro \
> -m /app \
> -s <YOUR_SITE_ID>

In the next section, you add the application as a Webflow Cloud app as part of the site.

4. Create a Webflow Cloud app and environment

Webflow Cloud apps can be part of a site or independent apps in your Workspace. Because this application contains components from the site you created, these steps cover creating an app as part of the site. Then, you configure the app to deploy updates automatically.

Webflow Cloud app creation
  1. In Webflow, navigate to your site’s settings and select Webflow Cloud from the sidebar.

  2. If Webflow is not yet connected to your GitHub account, click Login to GitHub to connect your GitHub account and then click Install GitHub app. Follow the instructions to enable Webflow Cloud to access your GitHub repositories.

  3. Click New project > Create app.

  4. Expand Import a GitHub repository and select your GitHub organization and repository.

  5. Specify a name for the Webflow Cloud app, the branch to deploy, and the path to deploy the application to. You can deploy other branches to other paths later, such as if you want to have separate staging and production environments.

  6. Click Deploy and wait for Webflow to import the repository and set up the Webflow Cloud app.

    The new app appears in the Webflow Cloud section of the site’s settings, as in this example:

    The new app in the site's Webflow Cloud settings

    The app also has an environment that is based on the branch and path that you specified when you created the app. To see it, click the app’s name in the Name column. The environment looks like this, showing the name of the environment and the history of builds and deployments:

    The new environment
  7. If you have not published the site yet, publish it now by going to the General settings page and clicking Publish.

  8. View the deployed app by opening its environment in the Webflow Cloud settings and clicking its link under Environment URL. Note that the URL includes the deployment path.

Now the application is deployed and updates automatically when you update the repository.

Deployments may take up to 2 minutes to complete. You can view the status of deployments and build logs on the environment page.

5. Add your Webflow design system to your Webflow Cloud app

The webflow cloud init command added several things to the application in the /webflow folder via DevLink, including:

  • The site’s global styles
  • Assets synced from the site
  • Foundational React components that Webflow sites use

For more information on what DevLink exports from sites into applications, see What’s exported.

To use these exported styles and components, you must import them in the app by adding the DevLinkProvider component to manage Webflow interactions in your app’s layout files. The webflow cloud init command automatically added this component to the application, as in these examples:

Next.js
Astro

If you created a Next.js app, the src/app/layout.tsx file wraps the content of the application in the DevLinkProvider component, as in this example:

1import type { Metadata } from "next";
2import { Geist, Geist_Mono, Inter } from "next/font/google";
3import "./globals.css";
4import { DevLinkProvider } from "../../../../webflow/DevLinkProvider";
5
6const inter = Inter({
7 subsets: ["latin"],
8 variable: "--font-inter",
9});
10
11const geistSans = Geist({
12 variable: "--font-geist-sans",
13 subsets: ["latin"],
14});
15
16const geistMono = Geist_Mono({
17 variable: "--font-geist-mono",
18 subsets: ["latin"],
19});
20
21export const metadata: Metadata = {
22 title: "Create Next App",
23 description: "Generated by create next app",
24};
25
26export default function RootLayout({
27 children,
28}: Readonly<{
29 children: React.ReactNode;
30}>) {
31 return (
32 <html lang="en">
33 <body
34 className={`${geistSans.variable} ${geistMono.variable} ${inter.variable} antialiased`}
35 >
36 <DevLinkProvider>
37 {/* Add here any Navbar or Header you want to be present on all pages */}
38 {children}
39 {/* Add here any Footer you want to be present on all pages */}
40 </DevLinkProvider>
41 </body>
42 </html>
43 );
44}

Follow the steps for your application platform:

Astro
Next.js
1

Install dependencies and run your app locally

Run the following commands in your terminal:

$npm install
$npm run dev
Currently, Webflow Cloud only supports using the npm package manager.
2

Add Webflow components to your Astro app

In the pages directory, update index.astro to include the Navbar and Footer components from the webflow folder in the root of your app. This example imports the components and includes them within the page structure:

index.astro
1---
2import Layout from '../layouts/Layout.astro';
3import { Navbar } from '@webflow/Navbar'; // Import the Navbar component
4import { Footer } from '@webflow/Footer'; // Import the Footer component
5---
6
7<Layout>
8 <Navbar
9 navbarLinkFeatures="Hello"
10 navbarLinkProducts="Webflow"
11 navbarLinkResources="Cloud"
12 navbarLinkContact=""
13 client:load />
14 <Section
15 client:load
16 tag="section"
17 className="margin-bottom-24px"
18 style={{
19 minHeight: '100vh',
20 display: 'flex',
21 alignItems: 'center',
22 justifyContent: 'center'
23 }}
24 >
25 <Container>
26 <Block
27 tag="div"
28 className="hero-split"
29 style={{
30 textAlign: 'center',
31 maxWidth: '600px',
32 margin: '0 auto'
33 }}
34 >
35 <h1 class="margin-bottom-24px">Welcome to Webflow Cloud</h1>
36 <p class="margin-bottom-24px">This is a simple test using Basic components with enhanced styling.</p>
37 <div>
38 <Link
39 button={true}
40 options={{
41 href: "#"
42 }}
43 className="button-primary"
44 >
45 Get Started
46 </Link>
47 </div>
48 </Block>
49 </Container>
50 </Section>
51 <Footer client:load />
52</Layout>
53
54<style>
55 h1 {
56 font-size: 2.5rem;
57 font-weight: 700;
58 background: linear-gradient(83.21deg, #3245ff 0%, #bc52ee 100%);
59 -webkit-background-clip: text;
60 -webkit-text-fill-color: transparent;
61 background-clip: text;
62 }
63</style>

You may need to add the @webflow alias to the tsconfig.json file as in this example:

1{
2 "extends": "astro/tsconfigs/strict",
3 "include": [
4 ".astro/types.d.ts",
5 "**/*"
6 ],
7 "exclude": [
8 "dist"
9 ],
10 "compilerOptions": {
11 "types": [
12 "@cloudflare/workers-types/2023-07-01"
13 ],
14 "jsx": "react-jsx",
15 "jsxImportSource": "react",
16 "baseUrl": ".",
17 "paths": {
18 "@webflow/*": ["webflow/*"]
19 }
20 }
21}

Then, add the alias to the astro.config.mjs file as in this example:

1import { defineConfig } from "astro/config";
2import { fileURLToPath } from "node:url";
3
4import cloudflare from "@astrojs/cloudflare";
5
6import react from '@astrojs/react';
7
8const webflowAlias = {
9 "@webflow": fileURLToPath(new URL("./webflow", import.meta.url)),
10};
11
12// https://astro.build/config
13export default defineConfig({
14 base: "/app",
15 output: "server",
16 adapter: cloudflare({
17 platformProxy: {
18 enabled: true
19 }
20 }),
21
22 integrations: [react()],
23 vite: {
24 resolve: {
25 // Use react-dom/server.edge instead of react-dom/server.browser for React 19.
26 // Without this, MessageChannel from node:worker_threads needs to be polyfilled.
27 alias: import.meta.env.PROD
28 ? { ...webflowAlias, "react-dom/server": "react-dom/server.edge" }
29 : webflowAlias,
30 },
31}
32});

Add the client:load directive to each component to indicate that Astro should load this component on the page.

3

Test your changes in a local preview environment

In your terminal, run the following command to start your app in a local preview environment that mimics your Webflow Cloud environment:

$npm run preview

Now you can create components in the Webflow site, export them, and use them in the application.

Next steps

Now that you’ve successfully created and deployed a Webflow Cloud app, here’s what you can do next.

Bring your app to Webflow Cloud

Learn about configuration options to work seamlessly with Webflow Cloud, and add advanced functionality to your new app.

Optimize your workflow

Learn how to manage environments for different stages of development.

Manage deployments

Explore deployment options and Webflow Cloud’s CI/CD integration with GitHub to streamline your release process.

Add a SQLite database to your app

Add a SQLite database to your app to store and retrieve user data.

Troubleshooting

My build failed

If you’re not sure why your build failed, or why there is an error in the CLI, see the log for detailed resolution information. Some common failure points include:

  • Authentication timeout: Run the deployment again
  • Build failures: Try building the app locally and checking and sanitizing symbols in app names and files
  • Component visibility: Check and resolve import paths
I'm seeing a 404 error when I try to access my app

If you have never published your site before, publish it now. If you don’t see the app, check your mount path, confirm that the environment exists, and verify that the latest deployment succeeded.

A deployment doesn't start when I push to my GitHub repo

The Webflow Cloud GitHub App may not have access to your repository. To check, go to the Webflow Cloud tab in your Webflow site settings and click Install GitHub app. Follow the prompts on GitHub to make sure Webflow has access to read from your repository. After you grant access, try committing to the branch that Webflow Cloud should be monitoring for deployments in your app.

I can't see assets in my app

If the app references assets, you must reference the mount path of your app (such as /app → mysite.webflow.io/app) to serve them correctly.

I need to change my export folder

You can change the directory that components are exported into with the rootDir option in webflow.json. For other configuration options, see Configuration options.