Skip to main content

Use third-party libraries

Using the AI chat in Figma Make and Figma Sites, you can prompt the model to include third-party libraries to support your functional prototypes, web apps, code layers, and code components. The same support applies to the code editor in both products.

Third-party libraries can be included using a normal import string. For example:

import * as THREE from 'three'

Make uses esm.sh to import libraries and automatically maps your import statements to use the content delivery network (CDN). Because we automatically do the mapping, you don't need to specify an esm.sh URL in your import statements.

You can then use tools delivered by the library as you would normally with React. For example:

import React from 'react'
import * as THREE from 'three'

export default function Layer() {
const containerRef = React.useRef(null)

React.useEffect(() => {
let renderer, scene, camera, geometry, material, cube;
try {
scene = new THREE.Scene();
camera = new THREE.PerspectiveCamera(75, 1, 0.1, 1000);
...