Skip to main content
Components let you reuse UI across your designs.
  • Same as code — Components in Subframe are the same building blocks your engineers use
  • Always in sync — When you update a component, all instances update and sync to code
  • Interactive when needed — Some components like checkboxes and accordions have built-in interaction logic using @subframe/core, our Radix-based headless component library. Learn more about headless components.
The Create a new component dialog with a prompt box above the Start from a template gallery

Importing components

We recommend importing your theme first so that imported components match your design system.
  1. Open Components under Project in the left sidebar
  2. Click New component
  3. Paste the source code of an existing component from your codebase into the prompt
  4. Press Enter or click the send button — the agent will take a few minutes to import your component

Creating components using AI

  1. Open Components under Project in the left sidebar
  2. Click New component
  3. Describe the component you want in the prompt
  4. Press Enter or click the send button — the agent will take a few minutes to create your component

Creating components from scratch

  1. Open Components under Project in the left sidebar
  2. Click New component
  3. Choose one of:
    • Remix an existing prebuilt component
    • Create from scratch
Some prebuilt components are based off of Radix primitives. If you want interactive logic like checked state, you must remix an existing prebuilt component.

Creating components from existing designs

Create a new component dialog
You can create components directly from elements on a page:
  1. Right-click or press / to open quick actions
  2. Select Create component
  3. Name your component
  4. Review the suggested properties
  5. Click Create
Subframe suggests component properties based on the elements you selected.

Editing components

To edit a component:
  1. Open Components under Project in the left sidebar
  2. Click on the component
  3. Click Edit component
To edit a component from the editor:
  1. Right-click or press / to open quick actions
  2. Select Edit component
Any changes you make will update all component instances.

Adding component instances

You can add a component instance by
  1. Open the quick insert menu
  2. Select the component you want to add

Detaching component instances

You can detach a component so the rendered elements are no longer linked to the component.
  1. Right-click or press / to open quick actions
  2. Select Detach instance
Components whose structure relies on tightly coupled primitives — dropdowns, selects, dialogs, drawers, charts, tables, and calendars — can’t be detached. The Detach component action is hidden for these.

Deleting components

You can delete a component from the Components page or from the … menu in the component editor. When a deleted component is used in other designs, Subframe handles existing instances based on the component type. The delete dialog shows what will happen before you confirm:
  • Instances will be detached — Custom components and most interactive primitives (buttons, switches, checkboxes, sliders, sidebars, navbars). Each instance becomes an independent copy of the rendered elements.
  • Instances will be deleted — Components whose structure can’t survive on their own (dropdowns, selects, dialogs, drawers, charts, tables, calendars). Customizations inside each instance are removed with it.
  • Layout assignments will be cleared — Page layouts. The pages using the layout stay, but lose their layout assignment.
  • References will be removed — Custom pages referenced from prototype actions or other pages.
Most deletes can’t be undone with Cmd + Z. To recover a deleted component, restore an earlier snapshot from Version history.

Resetting components

You can reset a prebuilt component to its original state, reverting any customizations you’ve made.
  1. Right-click or press / to open quick actions
  2. Select Reset to original
  3. Confirm the reset
This restores the component to its default configuration from the Subframe library.

Organizing components into folders

Folders group related components in your component library, for example by product area or release phase.
  1. Open Components under Project in the left sidebar
  2. Click New folder
  3. Click … beside the new folder and select Rename… to name it
To file a component, drag it onto a folder on the Components page or in the left sidebar. You can also click … beside the component, select Move to folder, and pick a folder. Select No folder to take it out. Click a folder to see only its components. Components you create while a folder is open are added to it. To delete a folder, click … beside it and select Delete….
Deleting a folder also deletes the components inside it. To keep them, move them out first.

Sorting components

The Components page lists every component in your project along with when each was last edited. Use the sort control at the top of the list to change the order:
  • A-Z — Alphabetical by name (default)
  • Recently edited — Most recently edited first
  • Recently created — Most recently created first

Viewing component docs

Each component has reference information for its React props, source code, and interactive examples. You can also write a design doc with usage rules and examples for your team and the agent.
  1. Open Components under Project in the left sidebar
  2. Click on a component

Exporting components to code

The Sync component card in the Export tab with the npx @subframe/cli@latest sync command and a copy button
  1. Click the Export tab at the top of the Inspector panel
  2. Copy and paste the npx @subframe/cli@latest command
For more information, see syncing components.

Importing from another project

Copy components and pages from one of your other Subframe projects into the current one. Each selection brings along the dependencies it needs to render — nested components, theme tokens, fonts, custom icons, and image assets.
  1. Open Components under Project in the left sidebar
  2. Click Import (top right) and select Copy from existing project…
  3. Pick the source project from the dropdown
  4. Browse or search the source project’s components and pages — click any item to preview it on the right
  5. Check the box on each item you want, then click Copy
Copied components join your component library. Copied pages land on your project’s first canvas.
Components that already exist in the current project don’t appear in the picker.
Last modified on October 16, 2026