Originally published on Crafttor.
TL;DR: A Figma frame can look exactly like a web page, but it cannot run the page's CSS. Hover states, transitions and keyframe animations need a browser engine. A Figma code layer animation runs that CSS for real. Capture the page with WebCapture to Figma, keep the frame for editing, and put the same page in a code layer when the motion has to play.
You import a polished landing page into Figma. The layout, gradients and buttons are right. Then you press present and hover a button. Nothing happens.
That is not a bug in your capture. It is the difference between a drawing of a page and a page that runs.
Why a Figma frame cannot play CSS animation
A Figma prototype has its own interaction model. You draw variants, connect them with triggers such as "while hovering" or "on click", and pick a Smart Animate or dissolve transition. It is a good system for designing new interactions.
CSS works differently. A hover in CSS is a rule like this:
.card { transition: transform 200ms ease-out, box-shadow 200ms ease-out; } .card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12); } A keyframe animation is a named timeline the browser runs on its own:
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } } .badge { animation: float 3s ease-in-out infinite; } Figma's prototype engine does not read selectors, pseudo classes or @keyframes. So a Figma prototype cannot replay CSS animations, however faithful the frame looks. To rebuild them as prototype interactions, you would draw a variant for every state and wire each trigger by hand.
Where WebCapture puts the motion
When you import a page with WebCapture to Figma, it detects hover states, transitions, CSS keyframe animations, scroll reveal effects and sticky or fixed positioning. It saves them with each layer as plugin data.
So on the frame, the motion is recorded, not lost. The data travels with the layer. But a frame is still a frame. It shows the resting state, and the motion waits for something that can run it.
That something is a code layer. As the plugin puts it: a frame looks like the page, a code layer runs it.
| Behaviour | On the imported frame | In a code layer |
|---|---|---|
| Layout, colours, type, icons | Editable layers | Rendered by real HTML and CSS |
| Hover states | Recorded as plugin data | Play when you hover |
| Transitions | Recorded as plugin data | Play with their real timing |
| Keyframe animations | Recorded as plugin data | Loop as on the live site |
| Links | Prototype connections | Work as links |
If you want the full background on capturing the motion itself, read how to capture hover states and CSS animations from any website. This post is about the next step: making that motion play inside Figma.
Two routes to a Figma code layer animation
After an import, the plugin offers two ways to carry the page into a runnable form. Both keep your editable frame untouched.
Route 1: Download HTML
Download HTML saves the page as a ready to run HTML, CSS and JS project. Its images and Google fonts are inside the project. Hover states, CSS animations and links work in it. If you recorded a flow with the Chrome extension, it replays too.
Open it in a browser and you have a local, working copy of the motion to study and tweak.
Route 2: Copy prompt for Claude
Copy prompt gives Claude, with the Figma MCP connected, everything it needs to add that project as a code layer beside your frame.
There is a reason Claude does the last step. Figma plugins cannot create code layers themselves, because the Plugin API has no way to make one. So the plugin prepares everything, and Claude finishes the job through the MCP.
Here is the flow:
- Import the page with WebCapture to Figma at the width you need.
- Run Copy prompt from the plugin after the import.
- Paste the prompt into Claude with the Figma MCP connected.
- Let Claude add the code layer next to your frame.
- Set the code layer to the size the prompt names. Code layers cannot be resized from the API, so you do this by hand.
- Press play and hover the elements that should move.
For a longer walkthrough of this route, see turning a website into a runnable Figma code layer.
Check the motion once it plays
Once the code layer is running, test it like you would test a staging build. A short checklist helps:
- Hover every interactive element. Buttons, cards, nav links and icons. Each one should change the way it does on the live site.
- Watch the timing. A 200ms ease out should feel quick and settled. If it feels sluggish, compare with the live page in a browser tab.
- Let loops run. Keyframe animations with
infiniteshould keep cycling without a visible jump at the loop point. - Scroll the layer. Scroll reveal effects and sticky headers depend on scrolling inside the layer, so scroll the whole page.
- Click links. They should still go where they went on the live page.
- Compare against the frame. The resting state in the code layer should match the frame beside it.
If something does not play, open the downloaded project in a desktop browser first. If it plays there, the issue is the layer size or setup. If it does not play there either, inspect the CSS. Our guide to inspecting CSS animations in Chrome DevTools shows how to slow an animation down and read its curve.
Editing the animation, not just viewing it
A running code layer is not the end of the road. Because it is real code, you can change the motion directly.
Common edits designers make:
- Shorten a slow transition. Change
transition: transform 400msto200msfor a snappier hover. - Swap the easing. Try
cubic-bezier(0.2, 0.8, 0.2, 1)for a softer settle than plainease. - Respect reduced motion. Wrap the decorative loops in a media query so users who ask for less motion get it:
@media (prefers-reduced-motion: reduce) { .badge { animation: none; } } - Tone down the lift. A
translateY(-4px)might become-2pxfor a calmer product UI.
Keep your edits small and check each one by hovering in the layer. That way you always know which change caused what.
Frame and code layer: use both
You do not have to choose. Use the frame to edit copy, swap images, adjust spacing and hand off values. Use the code layer to show how the page feels and to test CSS motion edits without leaving Figma.
One practical habit: name them clearly, for example "Pricing page / frame" and "Pricing page / code layer". Then nobody edits the frame expecting the motion to update.
Capture or rebuild only designs you own or have permission to use.
Privacy and cost, briefly
The URL you enter is rendered on Apify with your own API token, and a free Apify account is enough to start. Nothing from your Figma file is uploaded. For pages behind a login, use the Chrome extension, which needs no token. The plugin never sends anything to an AI, and it is free.
Try it on a page with real motion
Pick a page you own with a few hover effects and one looping animation. Import it, run Copy prompt, and put the code layer beside the frame. Then hover. The difference between "recorded" and "playing" is obvious within a few seconds.
Get WebCapture to Figma on the Figma Community and make your captured motion play.
FAQ
Why do my imported hover states not work in Figma's prototype mode?
A Figma prototype cannot replay CSS animations. WebCapture records hovers, transitions and keyframes as plugin data on each layer, but they only play in a code layer or in the downloaded HTML project.
Can the WebCapture plugin create the code layer by itself?
No. The Figma Plugin API has no way to create a code layer. The plugin prepares a prompt, and Claude with the Figma MCP connected adds the code layer for you.
Why is my code layer the wrong size?
Code layers cannot be resized from the API. Set the layer to the size named in the prompt, then press play.
Do scroll reveals and sticky headers work too?
WebCapture detects scroll reveal effects and sticky or fixed positioning and saves them with each layer. In a running code layer, scroll inside the layer to see them.
Is my Figma file sent anywhere?
No. Nothing from your Figma file is uploaded. Only the URL you enter is sent to Apify to be rendered.