Search
How to use overrides
Overrides enable you to modify Framer's behavior beyond its interface capabilities. They are code snippets that let you alter an element's properties programmatically.
Creation
Your project can store multiple separate files with overrides, allowing you to organize them as desired or easily move them between projects. To recognize your overrides in the code, Framer utilizes the TypeScript type system. Therefore, you need to decorate your exported functions as ComponentType.
You can name your override however you prefer, but conventionally we like to prefix the name with "withTapAnimation", "withBlueColor", or "withCurrentTime". Components are motion-enabled elements (e.g., motion.div) and support all the capabilities of Motion by default. They are ideal for creating fast animations and effects.
Link override
Overrides can also change the structure. Here we wrap the component inside of a link element.
Note: Overrides cannot have props, so sometimes you need to create a new override for each unique value, such as a URL. We plan to enhance this functionality in the future.
Note: Overrides are only visible in the preview and not on the canvas.