Framer
  • Support
  • Using Framer
Framer
  • Learn
    • Speedruns
    • Starter Kit
    • Examples
    • Tutorials
    • Sessions
  • Teams
    • Teams
    • Enterprise
  • Pricing
  • Blog
  • Updates
  • Support
  • Support
  • Using Framer

Related Articles

  • Can I make real apps with Framer?
  • Code Editor
  • Using Code Overrides
  • Using JSON data in Framer
  • Working with live data

Writing Components without TypeScript

Note: This article uses Framer’s code features. Find out how to enable code features in your project.

While Framer does use TypeScript, you're free to choose whether to use types in your code. In other words, even though the files will be TypeScript, you can write regular ES6/JavaScript and they will still work.

You may, however, run into type errors when interacting with Framer's API, whether you're using TypeScript or not. Type errors won't prevent your prototype from running, but they may indicate a bug. Check the error messages in the code editor to get help on solving the problem.

When in doubt, you can always get around these type errors types by using the any type. For example, height={props.height as any}.


Helpful?Was this article helpful?

0

0

Framer

  • Updates
  • Pricing
  • Tutorials
  • Teams
  • Enterprise
  • Blog
  • Motion

Platforms

  • Web
  • macOS
  • iOS
  • Android
  • Figma Importing
  • Sketch Importing
  • User Testing
  • Desktop PrototypingNew

Resources

  • Examples
  • Sessions
  • SpeedrunsNew
  • Packages
  • Volt
  • API
  • State of Prototyping
  • Wireframing Tool
  • Mockup Tool
  • Dictionary

About

  • Loupe
  • Community
  • Company
  • Careers
  • Security

Support

  • Using Framer
  • Accounts
  • Contact

  • Twitter
  • Discord
  • Dribbble

Copyright © 2021 Framer B.V.

  • Security
  • Terms of Service
  • Privacy Statement