Port to your framework
On this page

Port to your framework

Prompts that rebuild a product's pages as components in React, Vue, Svelte, Next.js or Nuxt, keeping its tokens, structure, states and motion.

Updated 18 November 2026

Every product today is static HTML, CSS and JavaScript. An agent can read the source and rebuild it in your framework. A port is not a restyle: the design stays the same and only the code around it changes.

Every prompt here works without the Orvio skill. A line under each says what the skill adds.

What a good port keeps#

Components follow the product's own boundaries

get_product lists the product's pages and components. Use that list as the split. A page becomes a page component made of one component per section, in the order the page has them. A component the product already names (a card, a navigation, a pricing table) becomes one component in your project. Do not invent a different split, and do not merge two sections to save a file.

Tokens stay as the product wrote them

read_tokens lists the CSS custom properties and the files that define them. Carry them over as they are, in one global stylesheet your project loads. Then point your tooling at them instead of copying values:

Tailwind theme config
// tailwind.config.js
// The names are yours, the values stay the product's variables.
export default {
  theme: {
    extend: {
      colors: { accent: "var(--<theme>-blush)" },
    },
  },
};

Never re-theme: do not round a value, merge two similar ones or replace a font. If your project already has a theme, add the product's variables beside it and map only the names you need.

The HTML structure, states and motion stay

Keep the elements, landmarks and heading order. Keep the classes and data attributes the CSS and scripts rely on, and the ARIA attributes. Keep every state the product draws: hover, focus, empty, loading, error. If the product's pages carry motion markers (on contract products, data-enter for load and data-ix="reveal" for scroll), keep them and keep the product's script working on those attributes. Port that script as the idiom of your framework (an effect, a composable, an action). Do not swap it for an animation library.

Framework by framework

Your frameworkHow the port goes
ReactEach section becomes a component, each page a route.
Next.jsUse the App Router. Sections are server components by default. Mark a component "use client" only when it holds state or runs the motion script.
VueSingle-file components with <script setup>. The motion script becomes a composable that runs on mount.
NuxtPages in pages/, sections in components/, the motion script as a composable or a client-only plugin.
SvelteComponents per section, routes per page. The motion script becomes an action (use:) on the elements that carry the markers.

Orvio never claims a product was tested in your framework. The port is the agent's work, and you check it.

Ask, then port#

FrameworkAsk, then port
Using Orvio, port <theme> to my project. Mode: port. First look at my project, or ask me which framework and styling approach it uses (plain CSS, Tailwind, CSS modules or other). Then: 1. Call get_product with "<theme>". Use its pages and components as the component boundaries: one component per section, and one component for each component the product names. Do not invent another split. Then call get_page for the page I port first (<page>), list its sections in order, and keep every one. 2. Call read_tokens. Keep the CSS custom properties exactly as they are in one global stylesheet. If I use Tailwind or a theme config, map names to var(--the-product-token). Never recompute, round or replace a value. 3. Keep the HTML structure, the class names and data attributes the styles and scripts use, the ARIA, every state (hover, focus, empty, loading, error) and the motion markers. Port the product's script as my framework's idiom on the same attributes. Add no animation library. 4. Port one page first (<page>), then compare it with the original section by section at 1440 and 390 before you do the next.
Works with MCP or CLI·Replace the highlighted parts

With the skill: it fetches the designer's notes (agent/instructions.md) and keeps the motion markers and states on its checklist, but the split, the tokens and the markup rules above are already in the prompt.

A page in React#

FrameworkA page in React
Using Orvio, port <theme>/page/<page> to my project. Mode: port. Call get_product with "<theme>" first, then get_page for it, list its sections in order, and rebuild it in React with Tailwind. One component per section, in the page's order, reusing a component for each one get_component returns. Keep the product's CSS custom properties from read_tokens and map them in my Tailwind config as var(--token). Keep the structure, states and motion markers. Do not re-theme. Then compare it with the original section by section at 1440 and 390.
Works with MCP or CLI·Replace the highlighted parts

With the skill: nothing extra for a port. It matters when you then add pages.

A page in Next.js#

FrameworkA page in Next.js
Using Orvio, port <theme>/page/<page> to my project. Mode: port. Call get_product with "<theme>" first, then get_page for it, list its sections in order, and rebuild it as a page in my Next.js App Router project. Sections are server components. Use "use client" only for a component with state or for the product's motion script. Keep the product's CSS custom properties from read_tokens in my global stylesheet and keep the structure, states and motion markers. Do not re-theme. Then compare it with the original section by section at 1440 and 390.
Works with MCP or CLI·Replace the highlighted parts

With the skill: nothing extra for a port.

A page in Vue or Nuxt#

FrameworkA page in Vue
Using Orvio, port <theme>/page/<page> to my project. Mode: port. Call get_product with "<theme>" first, then get_page for it, list its sections in order, and rebuild it as Vue 3 or Nuxt single-file components with <script setup>, one per section. Move the product's colours and type into my project as its CSS custom properties from read_tokens, unchanged. Port the motion script as a composable on the same markers. Keep the structure, states and responsive behaviour. Then compare it with the original section by section at 1440 and 390.
Works with MCP or CLI·Replace the highlighted parts

With the skill: nothing extra for a port.

A page in Svelte#

FrameworkA page in Svelte
Using Orvio, port <theme>/page/<page> to my project. Mode: port. Call get_product with "<theme>" first, then get_page for it, list its sections in order, and rebuild it as Svelte or SvelteKit components, one per section. Keep the product's CSS custom properties from read_tokens unchanged in my global styles. Port the motion script as an action on the same markers. Keep the structure, states and responsive behaviour. Then compare it with the original section by section at 1440 and 390.
Works with MCP or CLI·Replace the highlighted parts

With the skill: nothing extra for a port.

Interactive components on Radix or Base UI#

A theme's interactive parts (menus, dialogs, tabs, accordions) come with hand-written scripts. In a React project you can keep the theme's look and swap those scripts for a primitive library.

This is an example pattern. Orvio has not tested it in any framework or with either library. The code below was written from the libraries' documentation, not run against a product.

Why

  • The theme brings the look: the markup structure, the class names, the CSS custom properties and tokens, and the motion markers.
  • The library brings behaviour and accessibility: focus management, keyboard support, ARIA, dismiss on Escape and outside click, portals and collision handling.
  • You keep the styling. Both libraries are unstyled. You put the theme's classes on their parts and style their states, and you delete the theme's script for that pattern.

Both libraries are MIT licensed (checked on npm, 12 November 2026). Check the licence of any version you install.

The markers that exist

The theme contract marks interactive patterns with these data-ix values: menu (dropdowns, menus, selects, popovers and tooltips), tabs, collapse (accordions and expanders) and dialog. A menu is drawn with its trigger aria-expanded="false" and its panel role="menu". The theme's runtime opens the panel as a portal and eases it both ways with --ox-ease and --ox-duration.

The original

A shortened account menu, as a theme draws it:

Theme markup
<div class="acct" data-ix="menu">
  <button
    class="acct-btn"
    aria-haspopup="menu"
    aria-expanded="false"
  >
    Account
  </button>
  <div class="acct-panel" role="menu">
    <a class="acct-item" role="menuitem" href="/settings">
      Settings
    </a>
    <a class="acct-item" role="menuitem" href="/billing">
      Billing
    </a>
  </div>
</div>

Check the product's own stylesheet for the real class names and values. The CSS below is an illustration.

With Radix

Radix ships as one package, radix-ui (version 1.8.1 when checked). The older @radix-ui/react-* packages are separate; the current getting-started page shows radix-ui.

Radix
import { DropdownMenu } from "radix-ui";

export function AccountMenu() {
  return (
    <div className="acct">
      <DropdownMenu.Root>
        <DropdownMenu.Trigger className="acct-btn">
          Account
        </DropdownMenu.Trigger>
        <DropdownMenu.Portal>
          <DropdownMenu.Content
            className="acct-panel"
            align="end"
            sideOffset={8}
          >
            <DropdownMenu.Item className="acct-item" asChild>
              <a href="/settings">Settings</a>
            </DropdownMenu.Item>
            <DropdownMenu.Item className="acct-item" asChild>
              <a href="/billing">Billing</a>
            </DropdownMenu.Item>
          </DropdownMenu.Content>
        </DropdownMenu.Portal>
      </DropdownMenu.Root>
    </div>
  );
}

Radix exposes data-state="open" or "closed" on the trigger and the content, data-side and data-align for placement, and data-highlighted on the item under the keyboard or pointer. Its animation guide says Radix suspends unmounting while a CSS animation plays, so use keyframes for the close:

Radix states
.acct-panel[data-state="open"] {
  animation: acct-in var(--ox-duration) var(--ox-ease);
}
.acct-panel[data-state="closed"] {
  animation: acct-out var(--ox-duration) var(--ox-ease);
}
.acct-item[data-highlighted] {
  background: var(--<theme>-blush);
}
@keyframes acct-in {
  from { opacity: 0; transform: translateY(4px); }
}
@keyframes acct-out {
  to { opacity: 0; transform: translateY(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .acct-panel { animation: none; }
}

With Base UI

Base UI is one package, @base-ui/react (version 1.9.0 when checked). Import a component from its own path. A menu has a Positioner between the Portal and the Popup.

Base UI
import { Menu } from "@base-ui/react/menu";

export function AccountMenu() {
  return (
    <div className="acct">
      <Menu.Root>
        <Menu.Trigger className="acct-btn">
          Account
        </Menu.Trigger>
        <Menu.Portal>
          <Menu.Positioner align="end" sideOffset={8}>
            <Menu.Popup className="acct-panel">
              <Menu.LinkItem className="acct-item" href="/settings">
                Settings
              </Menu.LinkItem>
              <Menu.LinkItem className="acct-item" href="/billing">
                Billing
              </Menu.LinkItem>
            </Menu.Popup>
          </Menu.Positioner>
        </Menu.Portal>
      </Menu.Root>
    </div>
  );
}

Base UI marks the open popup with data-open and data-closed, and gives it data-starting-style while it animates in and data-ending-style while it animates out. Its handbook prefers transitions to animations, because a transition can be cancelled midway. The trigger has data-popup-open, and an item has data-highlighted. Its quick start also asks you to give your app root isolation: isolate so popups stay above the page.

Base UI states
.acct-panel {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--ox-duration) var(--ox-ease),
    transform var(--ox-duration) var(--ox-ease);
}
.acct-panel[data-starting-style],
.acct-panel[data-ending-style] {
  opacity: 0;
  transform: translateY(4px);
}
.acct-item[data-highlighted] {
  background: var(--<theme>-blush);
}
@media (prefers-reduced-motion: reduce) {
  .acct-panel { transition: none; }
}

How the theme's motion maps

ThemeRadixBase UI
Panel eased in and out with --ox-ease and --ox-durationdata-state plus keyframesdata-starting-style and data-ending-style plus a transition
Open state of the trigger (aria-expanded)data-state="open" on the triggerdata-popup-open on the trigger
Item hover and focusdata-highlighteddata-highlighted
Reduced motion: instantanimation: none in a media querytransition: none in a media query

data-enter and data-ix="reveal" are for blocks of a page, on load and on scroll. They have nothing to do with a menu panel, so leave them where the theme has them. Remove the data-ix marker from a pattern you replaced, so the theme's own script does not also bind to it.

Three things that break a port

  • Portals leave the wrapper. The panel is no longer inside .acct, so a selector such as .acct .acct-panel stops matching. Style the classes on their own.
  • Keep the tokens. Use the product's variables for colours, radii, shadows and motion. Do not accept a library default or a utility class that restyles a part.
  • Keep the product's own states. Each pattern keeps the states the theme draws, including empty and disabled.

Which primitive for which pattern

Only patterns that both libraries have are listed.

Theme patternRadixBase UI
Menu, account or action menu (data-ix="menu")Dropdown MenuMenu
Dialog (data-ix="dialog") and sheetDialogDialog
Tabs (data-ix="tabs")TabsTabs
Accordion or FAQ (data-ix="collapse")AccordionAccordion
TooltipTooltipTooltip
PopoverPopoverPopover
SelectSelectSelect
SwitchSwitchSwitch

A phone drawer is a Dialog in Radix. Base UI also has a Drawer component. The theme's drawer marker and its navigation are the product's own, so port them from the page.

FrameworkSwap in primitives
Using Orvio, port <theme> to my React project and build its interactive components on Radix UI or Base UI. Mode: port. Keep the theme's look and replace its hand-written scripts for those patterns. 1. Call get_product with "<theme>" and list the interactive patterns in its pages and components: menus, dialogs, tabs, accordions, tooltips, popovers, selects, switches. Call get_page for the page that uses each one (<page>) and get_component for each pattern (<component>), and read its markup and its markers (data-ix). 2. Map each pattern to the library's component for it. Check the library's current documentation for the package name, import and part names. Do not write them from memory. 3. Keep the theme's class names and its markup around the parts. Put the classes on the library's parts. Style open, closed and highlighted through the library's own state attributes, not through the theme's script classes. Do not re-theme. Take colours, radii, shadows and motion from the product's tokens (read_tokens), with the product's easing and duration, and instant under reduced motion. 4. Remove the data-ix marker and the script for each pattern you replaced. Leave data-enter and data-ix="reveal" as they are. 5. Check that selectors do not depend on the panel being inside its wrapper, because portals move it. 6. At 1440 and 390 wide, check by keyboard that each pattern opens, moves with the arrow keys, closes with Escape and returns focus to its trigger, and compare each with the original side by side, section by section.
Works with MCP or CLI·Replace the highlighted parts

With the skill: it adds the written check of every state, the focus ring and the phone navigation at 390, and the rule that nothing outside the product's tokens ships.

Check the port#

Check every page before you move on. Render the original and your port at 1440 and 390 wide, full height, and put them side by side. To get the original, run orvio pull and open the pulled folder in a browser.

FrameworkCheck a port
I ported <page> of <theme> to my project. Mode: port. Get the original with `orvio pull <theme>` if you do not have it. Render the original and my port at 1440 and 390 wide, full height, crop both section by section and compare them side by side at full size: sections present and in order, element count, type sizes and weights, section gaps, colours, radii, shadows, states, motion and navigation, including the phone navigation at 390. List every difference and fix the ones that are not deliberate.
Works with MCP or CLI·Replace the highlighted parts

With the skill: it runs the same comparison with a written checklist for the mode, and asks for a report of what changed.

Tips for a good port#

  • Name the pages. Pages and components keep a port small and checkable.
  • Connect your own data. The product's content is an example.
  • Check phone width too. A port that is right at 1440 can lose its navigation at 390.

If you are not sure which framework a product uses, ask for get_product. It reports the framework, how that was found, and the compatibility evidence the release records.

Was this page clear? Yes · Not reallyEdit suggestions: support@orvio.designUpdated 18 November 2026