Created
October 17, 2018 10:58
-
-
Save asci/05bedfafd3e5bf4edb6083974c0b465e to your computer and use it in GitHub Desktop.
Framer X connected components
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Data, animate, Override, Animatable } from 'framer'; | |
export const data = Data({ rotation: Animatable(0) }); | |
export const RotateValue: Override = () => { | |
return { | |
rotation: data.rotation, | |
}; | |
}; | |
export const RotateTrigger: Override = props => { | |
data.rotation.set(props.rotation); | |
return { | |
onTap() { | |
animate.spring(data.rotation, data.rotation.get() + 90, { | |
tension: 250, | |
friction: 20, | |
}); | |
}, | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
here is Framer X document
https://drive.google.com/file/d/1jOrnyboifBaye7MwXkRVB4BQI5dMjYXa/view