Responsive embed

Is it possible to have responsive Figma embeds so that they exactly fill the parent container?
I tried using 100% to replace height and width dimensions to no avail.

Have you worked this one out?

No. This forum seems pretty dead.

Hey Manuel! I also ran into this and believe I have a viable fix:

I wrapped my <iframe> that contains the Figma embed in a div, and gave that div a class called .figma-embed. It has two declarations:

.figma-embed{ height:65vh; display:flex; }

Setting the iframe’s containing div to display:flex; did the trick, and I got the idea from looking at Figma’s embed documentation for developers, I noticed this in the first code snippet and figured I’d give it a go, and it worked!

The <iframe> itself has inline styling with the height and width set boh set to 100%.

If you want to inspect around on my implementation here’s a link, you’ll find the embed about halfway down the page. Also here’s an annotated screenshot to show these declarations in action:

hope this helps you out for your use case!