Skip to content

Instantly share code, notes, and snippets.

@neiljohnston
neiljohnston / FontAwesomeFont.tsx
Last active May 16, 2022 15:16
Include Font Awesome in Framer as a Code Component
import * as React from "react"
import { Frame, addPropertyControls, ControlType } from "framer"
import { motion } from "framer-motion"
async function importScripts() {
let script = document.createElement("script")
script.id = "font-awesome-fonts-script"
// create a fontawesome kit: https://fontawesome.com/start
script.src = "https://kit.fontawesome.com/KIT_ID_HERE.js"
script.crossOrigin = "anonymous"