framer
Integrates design tokens with Framer for prototyping and production sites. Use when adding CSS custom properties to Framer projects, creating code components…
by dylantarre★ 56 GitHub stars
Install framer in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Framer Token Integration
Overview
Integrate design tokens with Framer for consistent prototyping and production sites. Use CSS custom properties, Framer overrides, and code components to bring your design system into Framer.
When to Use
- Setting up design tokens in Framer
- Creating Framer code components with tokens
- Building interactive prototypes with design system
- Publishing Framer sites with consistent styling
Quick Reference: Integration Methods
| Method | Use Case | Complexity |
|---|---|---|
| CSS Variables | Global token import | Simple |
| Code Components | Custom React components | Medium |
| Overrides | Dynamic styling | Simple |
| Framer Library | Shared component library | Advanced |
The Process
- Export tokens as CSS: Generate CSS custom properties file
- Import in Framer: Add to custom code or component
- Create code components: Build with token references
- Set up overrides: Apply dynamic styles
- Publish and maintain: Keep tokens in sync
CSS Variables in Framer
Global CSS Import
In Framer Site Settings → Custom Code → Head:
<style>
:root {
/* Colors */
--color-primary-50: #eff6ff;
--color-primary-100: #dbeafe;
--color-primary-500: #3b82f6;
--color-primary-600: #2563eb;
--color-primary-900: #1e3a8a;
--color-gray-50: #f9fafb;
--color-gray-100: #f3f4f6;
--color-gray-500: #6b7280;
--color-gray-900: #111827;
--color-success-500: #22c55e;
--color-warning-500: #f59e0b;
--color-error-500: #ef4444;
/* Spacing */
--spacing-xs: 4px;
--spacing-sm: 8px;
--spacing-md: 16px;
--spacing-lg: 24px;
--spacing-xl: 32px;
/* Typography */
--text-xs: 12px;
--text-sm: 14px;
--text-base: 16px;
--text-lg: 18px;
--text-xl: 20px;
--text-2xl: 24px;
/* Border Radius */
--radius-sm: 4px;
--radius-md: 8px;
--radius-lg: 16px;
--radius-full: 9999px;
/* Shadows */
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
/* Dark mode */
[data-framer-theme="dark"] {
--color-background: var(--color-gray-900);
--color-foreground: var(--color-gray-50);
}
</style>
External CSS File
Link your token CSS file:
<link rel="stylesheet" href="https://your-cdn.com/tokens.css">
Code Components
Button Component
Button.tsx (Framer Code Component):
import { addPropertyControls, ControlType } from "framer"
import { motion } from "framer-motion"
interface ButtonProps {
text: string
variant: "primary" | "secondary" | "ghost" | "danger"
size: "sm" | "md" | "lg"
fullWidth: boolean
disabled: boolean
onClick?: () => void
}
export function Button({
text = "Button",
variant = "primary",
size = "md",
fullWidth = false,
disabled = false,
onClick,
}: ButtonProps) {
const sizeStyles = {
sm: {
height: 32,
padding: "0 var(--spacing-sm)",
fontSize: "var(--text-sm)",
},
md: {
height: 40,
padding: "0 var(--spacing-md)",
fontSize: "var(--text-base)",
},
lg: {
height: 48,
padding: "0 var(--spacing-lg)",
fontSize: "var(--text-lg)",
},
}
const variantStyles = {
primary: {
backgroundColor: "var(--color-primary-500)",
color: "white",
border: "none",
},
secondary: {
backgroundColor: "transparent",
color: "var(--color-gray-700)",
border: "1px solid var(--color-gray-300)",
},
ghost: {
backgroundColor: "transparent",
color: "var(--color-gray-700)",
border: "none",
},
danger: {
backgroundColor: "var(--color-error-500)",
color: "white",
border: "none",
},
}
const hoverStyles = {
primary: { backgroundColor: "var(--color-primary-600)" },
secondary: { backgroundColor: "var(--color-gray-50)" },
ghost: { backgroundColor: "var(--color-gray-100)" },
danger: { backgroundColor: "var(--color-error-600)" },
}
return (
<motion.button
style={{
...sizeStyles[size],
...variantStyles[variant],
width: fullWidth ? "100%" : "auto",
display: "inline-flex",
alignItems: "center",
justifyContent: "center",
gap: "var(--spacing-xs)",
borderRadius: "var(--radius-md)",
fontWeight: 500,
cursor: disabled ? "not-allowed" : "pointer",
opacity: disabled ? 0.5 : 1,
fontFamily: "inherit",
outline: "none",
}}
whileHover={disabled ? {} : hoverStyles[variant]}
whileTap={disabled ? {} : { scale: 0.98 }}
onClick={disabled ? undefined : onClick}
disabled={disabled}
>
{text}
</motion.button>
)
}
addPropertyControls(Button, {
text: {
type: ControlType.String,
title: "Text",
defaultValue: "Button",
},
variant:
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the framer skill do?
Integrates design tokens with Framer for prototyping and production sites. Use when adding CSS custom properties to Framer projects, creating code components, or building Framer sites with design systems.
How do I install the framer skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the framer skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…