For this guide we’ll assume that you’re using Turborepo as your monorepo and Next.js for your frontend. Monorepo-specific functionality should work with any package manager or framework that supports workspaces. For more information visit the manual installation guide and the framework guide for your frontend of choice.
Create a package for Subframe
Since we’re using Turborepo, we can use theturbo generate command to create a package in our monorepo where we’ll be importing our Subframe components. We’ll call the package @repo/subframe.
devDependencies for the next step.
We’ll also want to integrate our monorepo’s TypeScript and ESLint configuration, so we’ll create the following two files:
Install Subframe
We now want to install and configure Subframe in our new package. Let’s do so by running the@subframe/cli init command.
Export Subframe components from your package
To be able to import our components from this package in other apps in the monorepo, we’ll have to make sure they can find the components within our package, as well as Subframe’s TailwindCSS config. We can easily achieve this by setting theexports field in our package.json accordingly:
packages/subframe/package.json
Install the @repo/subframe package into your app
To install your local package to your app, add the following line to your frontend apps’ dependencies:
install command to link your dependencies:
Set up TailwindCSS in your frontend app
- Tailwind v3
- Tailwind v4
We assume you’ve already set up Tailwind CSS for your frontend app. If you haven’t done so, follow the Tailwind CSS guide.
preset from our local package, as well as include the Subframe component source files in tailwind’s content array:apps/web/tailwind.config.js
Use Subframe components in your app
You can now import Subframe components directly into your app. Since we changed the import alias to the name of your local package, all imports generated by the Subframe app will resolve to the components in your@repo/subframe package.


