Search
Search
createCodeFile
createCodeFile
createCodeFile
Create a new code file in the project.
const newFile = await framer.createCodeFile(
"MyComponent",
`export default function MyComponent() {
return <div>Hello World</div>
}`
);
Parameters
name: string
— The name of the file to createcode: string
— The initial content of the file
Returns
Promise<CodeFile>
– The created CodeFile instance