Tutorial · 9 min read

Angular to Figma: Import Angular Components into Figma

Angular renders to HTML and CSS — and that output converts to native, editable Figma layers in seconds. Here's the exact workflow for Angular 17/18 developers, including Angular Material, Angular Universal, and Nx monorepos.

HF

HTML to Figma Team

Last reviewed: April 2026

Converting Angular components to Figma means capturing a rendered Angular component's DOM output and computed CSS and importing it into native, editable Figma layers. Because Angular compiles to standard HTML, you can copy the rendered output from any running Angular app — Angular Material, Nx, Angular Universal, localhost — via browser DevTools, then paste it into html2design without touching any source code. The workflow takes approximately 30 seconds per component.

The Angular/Figma Gap

Angular teams deal with a design-dev disconnect that compounds over time. Your component library — buttons, data tables, modals, navigation shells, form controls — has been carefully built, tested, and iterated over months or years. Meanwhile, the Figma file reflects a design sprint from six months ago that nobody has kept up to date.

Designers are forced to work from stale mockups. They spend hours reconciling the "Figma version" of a component with what the team actually shipped. Every sprint, the gap between the live application and the design file grows wider.

The intuitive fix is to import the real, running components into Figma. But Angular components are TypeScript classes that depend on a compiler, a dependency injection container, and the Angular runtime — they don't exist as static assets. The few tools that claim to automate Angular-to-Figma conversion require adding custom decorators, build plugins, or maintaining a parallel Storybook setup just to capture component output.

There is a simpler path. Angular already renders to HTML and CSS. The browser produces a standard DOM with computed styles — and that output is all html2design needs. You can capture any Angular component from any running dev server, without changing a single line of code, in about 30 seconds.

Why This Works

When an Angular component renders in the browser, the framework compiles the template, resolves bindings, applies styles via ViewEncapsulation, and produces a standard HTML DOM with computed CSS. At that moment, the output is just HTML — Angular's compiler and runtime are no longer visible.

The html2design Figma plugin processes raw HTML and CSS. It reads the computed styles the browser has resolved and maps them to native Figma layers: frames, text, fills, vector paths, and border radii. The plugin is completely indifferent to how the HTML was generated — Angular 17 standalone components, NgModule-based apps, server-rendered Angular Universal output, or any other Angular setup all produce the same kind of DOM.

Key insight: You don't need an "Angular to Figma" plugin. You need an "HTML to Figma" plugin — because that's exactly what Angular produces after compilation. html2design is built precisely for this workflow.

Prerequisites

Step-by-Step: Convert an Angular Component to Figma

Step 1

Run your Angular app locally

Start your Angular development server with the Angular CLI:

# Angular CLI (default port 4200) ng serve # Nx monorepo — target a specific app npx nx serve my-app # Angular with a custom port ng serve --port 4300

Navigate to the route that renders the component you want to capture. If the component is deep in the navigation hierarchy, route directly to it — Angular Router supports deep links without a full page reload.

Step 2

Open DevTools and locate the component

Open browser DevTools with Cmd+Option+I (Mac) or F12 (Windows/Linux). Switch to the Elements panel.

Use the element picker (Cmd+Shift+C on Mac) to click directly on the component you want to capture. DevTools highlights the matching DOM node.

Navigate up the DOM tree to find the component's host element. In Angular, each component has a host element that corresponds to its selector tag — e.g., <app-card>, <mat-button>, <app-data-table>. This is the element you want to copy, not a child element inside it.

Step 3

Copy the rendered HTML

In the Elements panel, right-click the host element → Copy → Copy outerHTML.

This copies the fully rendered HTML — with Angular host attributes, resolved bindings, and computed class names. For an Angular component styled with Angular Material, the output looks like:

<mat-card _nghost-ng-c3874619021 class="mat-mdc-card mdc-card ng-star-inserted"> <mat-card-header _ngcontent-ng-c3874619021> <div mat-card-avatar _ngcontent-ng-c3874619021 class="mat-mdc-card-avatar user-avatar"></div> <mat-card-title _ngcontent-ng-c3874619021> <span class="mdc-card__title">Sophie Martin</span> </mat-card-title> <mat-card-subtitle _ngcontent-ng-c3874619021>Lead Designer</mat-card-subtitle> </mat-card-header> <mat-card-content _ngcontent-ng-c3874619021 class="mat-mdc-card-content"> <p>Saved hours on our design sync process.</p> </mat-card-content> </mat-card>

Angular adds _nghost-* and _ngcontent-* attributes for ViewEncapsulation. These are harmless — html2design ignores unknown attributes and reads the computed CSS values instead of relying on class name selectors.

Step 4

Open html2design in Figma

Switch to your Figma file. Open the plugin via Main Menu → Plugins → html2design. The plugin panel appears on the right side of the canvas.

Make sure you are signed in with an active subscription. If not subscribed yet, install the plugin from Figma Community and start a subscription — it takes about two minutes.

Step 5

Paste and convert

Paste the copied HTML into the plugin's input field (Cmd+V on Mac, Ctrl+V on Windows). Click Convert.

The plugin generates a native Figma frame on the canvas with:

Step 6

Clean up and promote to a component

Select the generated frame. Review the layer names in the Layers panel — auto-generated names like mat-card._nghost should be renamed to match your Angular component vocabulary (UserCard, DataTable/Row, etc.).

When the layers look right, select the root frame and press Cmd+Alt+K (Mac) or Ctrl+Alt+K (Windows) to promote it to a Figma Component. Capture additional component states (hover, focused, disabled, loading) separately and combine them as Figma Variants.

Angular-Specific Workflows

Working with Angular Material

Angular Material is the most widely used Angular component library. Its components (mat-button, mat-card, mat-table, mat-dialog, etc.) render to fully styled HTML with MDC-based class names. The import workflow is identical to any other Angular component: open the component in the browser, copy its outerHTML, and paste into html2design.

Angular Material applies theme colors through CSS custom properties and computed values. html2design reads those resolved values — so your brand theme (primary, accent, warn colors) comes through accurately in the Figma output. Material's elevation (box-shadow) and border-radius system are also preserved.

Angular Material tip: For components that exist in a dialog or overlay (mat-dialog, mat-menu, mat-tooltip), Angular renders the overlay content in a CDK overlay container at the root of the document — outside your component's DOM tree. Inspect the div.cdk-overlay-container element at the bottom of <body> to find and copy dialog or menu content.

Angular ViewEncapsulation

Angular's default ViewEncapsulation (Emulated mode) scopes component styles by adding _nghost-* and _ngcontent-* attributes to elements. When you copy a component's outerHTML, the browser has already applied those scoped styles as computed CSS values. html2design reads the resolved computed output — not the attribute selectors — so Emulated encapsulation, None encapsulation, and global styles all produce the same result.

Angular standalone components (Angular 17+)

Angular 17 made standalone components the default. Whether your app uses standalone components, NgModule-based architecture, or a mix, html2design only sees the HTML the browser produces. The structural difference between @Component({ standalone: true }) and a module-declared component is invisible in the rendered DOM — both produce the same kind of HTML output.

Angular Universal and @angular/ssr

Angular Universal server-renders component templates before the browser receives them. By the time you inspect a Universal page in DevTools, the full HTML is already in the DOM — including data resolved from server-side HTTP calls. Copy it exactly as you would for a client-rendered component.

Angular 17+ ships built-in SSR via @angular/ssr. Pages rendered by this mechanism also produce complete HTML in the browser. One thing to note: Angular SSR apps use hydration, which means the initial server-rendered DOM is patched by the client on load. Wait for the page to fully hydrate before opening DevTools and copying — this ensures all bindings have resolved.

Capturing different component states

Angular components often have multiple visual states driven by @Input() properties, RxJS observables, or NgRx/Signals state. To capture each state for Figma:

In Figma, import each state as a separate frame, then combine them as Variants under a single Component. This mirrors your Angular component's @Input() API directly in the Figma component structure.

Angular DevTools tip: The Angular DevTools browser extension shows you the component tree for the current page and lets you inspect and modify component inputs and state in real time. Use it to trigger specific component states before switching to the Elements panel to copy the rendered output.

Nx monorepo workflows

If your Angular applications live in an Nx workspace, the serve workflow is identical — just target the specific app with npx nx serve <app-name>. Nx's build caching and module federation don't affect the rendered HTML in the browser. For shared Nx component libraries, serve the Storybook or demo app for that library:

# Serve a shared UI library's Storybook npx nx storybook ui-components # Storybook default port open http://localhost:4400

This gives you isolated, single-component renders without navigating through a full application — ideal for batch-importing an entire component library into Figma.

What Gets Converted from Angular Components

html2design accurately converts the vast majority of what Angular components produce. Here's what to expect:

Component-level beats full-page. Convert one component at a time rather than the full page HTML. Smaller input produces a cleaner Figma layer tree that's easier to name, organize, and promote to a reusable Component.

Angular vs. Other Frameworks: What's Different

Framework Dev server Default port Notes for html2design import
Angular ng serve 4200 _nghost-* / _ngcontent-* attributes are harmless; CDK overlay container holds dialogs/menus
React npm run dev 3000 / 5173 No host element wrapping; copy from the component's outermost div
Vue npm run dev 5173 data-v-* scoped CSS attributes are harmless
Any HTML/CSS Any server Any Works the same — html2design only sees the rendered DOM output

Building an Angular Design System in Figma

Once you have a reliable workflow for converting individual Angular components, you can systematically build a Figma design system that mirrors your real component library. A practical sequencing:

For each component, capture three or four key states: default, hover (force via DevTools), disabled, and loading or error. These cover the vast majority of what designers need to produce accurate mockups and handoff specs.

Once your core component set is in Figma as reusable Components, publish the Figma file as a Team Library. Designers can use components from the library in new mocks — and you can update the library by re-importing components after shipping changes, keeping Figma in sync with the live Angular codebase. See our guide on keeping Figma designs and code in sync for the full maintenance workflow.

Angular teams maintaining a shared design system (via Nx or a standalone npm package) benefit especially here: the source of truth is the running code, and Figma becomes an accurate mirror rather than a slowly diverging artifact.

Frequently Asked Questions

Can I convert an Angular component to Figma?

Yes. Angular renders to standard HTML and CSS in the browser. You copy that rendered output using DevTools and paste it into the html2design Figma plugin. No special Angular plugin, build annotation, or code change is needed.

Does Angular to Figma work with localhost?

Yes. html2design works from HTML you paste directly into the plugin — it does not need to reach a URL. Your Angular dev server on localhost:4200 works exactly the same as a live URL. See our guide on converting HTML to Figma for the general workflow.

Does html2design work with Angular Material components?

Yes. Angular Material renders to standard HTML with Material Design class names and CSS custom properties for theming. html2design reads the browser's computed styles — so your Angular Material theme's primary color, shape, and elevation values all come through accurately in the Figma output.

Can I import Angular Universal (SSR) pages into Figma?

Yes. Angular Universal and @angular/ssr both server-render to HTML that you can inspect in DevTools after the page loads. The HTML in DevTools is the fully resolved output — copy it and paste it into html2design exactly as you would for any client-rendered component. See our guide on importing a website into Figma for full-page strategies.

Does html2design work with Angular standalone components?

Yes. Standalone components (the Angular 17+ default) and NgModule-based components produce identical DOM output in the browser. html2design only processes the rendered HTML — the Angular architecture behind it is transparent to the plugin.

Key Takeaways


Related Articles

Import your Angular components now

html2design converts any Angular component — Material, standalone, Nx, Universal — into editable Figma layers in seconds.

Get the Plugin →