Introduction
Morph lets each user of your app reshape their own pages by asking. They can rearrange, resize, hide and restyle the parts of a page, or add new views, and Morph saves their version. Your components, your data and your rules stay in charge.
How it works#
- You mark the parts of a page. Each part is wrapped in a
<Section name="…">: a card, a chart, a table, a toolbar.npm init usemorph@latestadds these tags for you. - A user asks for a change in the Morph box in the corner of the page: "Put the chart on top and hide the news," "make the sidebar text bigger," "a weekly goal I can set."
- The AI writes that user's version. Each area on screen (the page's content, the app's sidebar) is a small React page that places your sections, using your own layout components, and may add new parts built from your data. App-wide requests like "more compact" become theme settings.
- Morph checks it before saving. The code is checked on Morph's server, then the page is rendered and your rules are checked on screen ("this part must stay visible"). If something's wrong, the AI repairs it; if it can't, nothing changes.
- The page is saved for that user, with undo and reset. Everyone else still sees your page, or their own version.
What stays in your hands#
- Your sections are sealed. Morph decides where a section goes, how big it is and how it's styled, never what's inside it. A section renders exactly what you wrapped, with your data and your props.
- Your rules hold. A section marked
keepcan't be hidden, covered or pushed off screen. - Your data never reaches Morph's servers. The AI gets a description of your page (part names, layout, and the types of any data you share), never the values.
- Your secret key stays on your server. Browsers get short-lived passes for one signed-in user, and only from websites you allow.
What you need#
| React | 19 |
| One-command setup | Next.js with the App Router. Other React 19 apps can add the same pieces by hand. |
| A sign-in system | Any: your own, Auth.js, Clerk, Supabase, Firebase… Morph saves a page per signed-in user. |
| A server route | For the token endpoint (one small file). |
The pieces#
| Package | What it is |
|---|---|
@usemorph/react |
In your frontend: <MorphProvider>, <MorphSurface>, <Section> and the Morph box |
@usemorph/node |
On your server: the token endpoint that tells Morph who's signed in |
@usemorph/cli |
usemorph init, usemorph sync and friends. npm init usemorph@latest runs it. |
Morph itself is a hosted service at https://api.usemorph.dev: the AI, the checks, and every user's saved pages.
Ready? Start with the Quickstart.