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.
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.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 framework | How the port goes |
|---|---|
| React | Each section becomes a component, each page a route. |
| Next.js | Use the App Router. Sections are server components by default. Mark a component "use client" only when it holds state or runs the motion script. |
| Vue | Single-file components with <script setup>. The motion script becomes a composable that runs on mount. |
| Nuxt | Pages in pages/, sections in components/, the motion script as a composable or a client-only plugin. |
| Svelte | Components 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#
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#
With the skill: nothing extra for a port. It matters when you then add pages.
A page in Next.js#
With the skill: nothing extra for a port.
A page in Vue or Nuxt#
With the skill: nothing extra for a port.
A page in Svelte#
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:
<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.
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:
.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.
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.
.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
| Theme | Radix | Base UI |
|---|---|---|
Panel eased in and out with --ox-ease and --ox-duration | data-state plus keyframes | data-starting-style and data-ending-style plus a transition |
Open state of the trigger (aria-expanded) | data-state="open" on the trigger | data-popup-open on the trigger |
| Item hover and focus | data-highlighted | data-highlighted |
| Reduced motion: instant | animation: none in a media query | transition: 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-panelstops 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 pattern | Radix | Base UI |
|---|---|---|
Menu, account or action menu (data-ix="menu") | Dropdown Menu | Menu |
Dialog (data-ix="dialog") and sheet | Dialog | Dialog |
Tabs (data-ix="tabs") | Tabs | Tabs |
Accordion or FAQ (data-ix="collapse") | Accordion | Accordion |
| Tooltip | Tooltip | Tooltip |
| Popover | Popover | Popover |
| Select | Select | Select |
| Switch | Switch | Switch |
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.
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.
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.