---
title: "Behind the feature: Inline device frames"
description: "Figma's inline device frames let designers drag and resize phone, tablet and watch bezels directly in the editor while still interacting with the prototype screen."
url: "https://swe.quest/articles/behind-the-feature-inline-device-frames-1518cab3c2d11c6b"
canonical: "https://www.figma.com/blog/behind-the-feature-inline-device-frames/"
source: "Figma"
published: "2024-02-27"
difficulty: "medium"
kind: "Case study"
reading_minutes: 8
tags: ["frontend","product-engineering","developer-tools"]
---

# Behind the feature: Inline device frames

A post on [Figma](https://swe.quest/sources/figma.md), published 2024-02-27, 8 min read, Case study. Original: [https://www.figma.com/blog/behind-the-feature-inline-device-frames/](https://www.figma.com/blog/behind-the-feature-inline-device-frames/)

## Summary

Figma's inline device frames let designers drag and resize phone, tablet and watch bezels directly in the editor while still interacting with the prototype screen. Because device frames are raster images, the team built 50 per-device SVG hit targets: a red draggable bezel region that scales with the device and a green 16-pixel resize outline. SVG's built-in hit detection and mouse handlers separate bezel clicks from screen clicks, which made it a better choice than CSS-specified shapes or transparency checks. An internal Figma plugin generated most targets heuristically from existing hand-drawn frames, while watches and other unusual shapes were drawn by hand.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [Product engineering](https://swe.quest/tags/product-engineering.md) (Engineering organization)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)

## Prerequisites

- SVG basics

## Keywords

Figma, SVG, inline preview, Figma plugins

## Related posts

- [Version control: Three ways Figma explored horizontal scrolling](https://swe.quest/articles/version-control-three-ways-figma-explored-horizontal-scrolling-b5d14a196ba742eb.md): Figma · 2025-04-16 · Medium · 7 min read · Frontend, Product engineering, React
  Adding horizontal scrolling to Figma's Layers panel was harder than expected because the list is virtualized (only visible rows render), rows are interactive (hide, lock, collapse, rename), and layer names vary in length.
- [Building accessibility into a canvas-based product](https://swe.quest/articles/building-accessibility-into-a-canvas-based-product-b9de69277feff18d.md): Figma · 2026-07-01 · Medium · 9 min read · Accessibility, Frontend, Browsers, React
  Because Figma renders its canvas itself rather than through HTML, the browser's accessibility tree is nearly empty, so Figma rebuilt accessibility with a hidden but laid-out "Mirror DOM" synced to the scenegraph.
- [Behind the feature: comments, contextually](https://swe.quest/articles/behind-the-feature-comments-contextually-600ba48168833f50.md): Figma · 2021-03-09 · Medium · 11 min read · Frontend, CSS, Product engineering
  Adding general and contextual (canvas-anchored) comments to Figma Community files turned out to be harder on interaction design than on code reuse.
- [A conversation with Figma's accessibility team](https://swe.quest/articles/a-conversation-with-figma-s-accessibility-team-4d7c0aee064f1f20.md): Figma · 2022-11-17 · Easy · 9 min read · Accessibility, Frontend
  Figma's accessibility engineers and PM reflect on shipping screen reader support for prototypes and a FigJam beta.
- [Behind the feature: Find and replace](https://swe.quest/articles/behind-the-feature-find-and-replace-2ebc376de57a3841.md): Figma · 2022-10-06 · Easy · 9 min read · Product engineering, Search, Algorithms
  Find and replace in Figma and FigJam turned out to be far harder than a search bar because canvas content is multi-directional, so result ordering had to be designed rather than inherited.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
