Skip to content

Instantly share code, notes, and snippets.

--- a/adidas-landing.framerfx/code/App.tsx
+++ b/adidas-landing.framerfx/code/App.tsx
@@ -16,9 +16,19 @@ export function Scroll(): Override {
})
} else if (showHeader == false && move > -40) {
showHeader = true
- await headerAnim.start({
+ headerAnim.start({
top: 0,
})
--- a/adidas-landing.framerfx/code/App.tsx
+++ b/adidas-landing.framerfx/code/App.tsx
@@ -8,6 +8,27 @@ export function Scroll(): Override {
async onScroll(e) {
var move = e.point.y
log('move', move)
+
+ if (showHeader && move < -50) {
+ showHeader = false
+ headerAnim.start({
--- a/adidas-landing.framerfx/code/App.tsx
+++ b/adidas-landing.framerfx/code/App.tsx
@@ -8,6 +8,27 @@ export function Scroll(): Override {
async onScroll(e) {
var move = e.point.y
log('move', move)
+
+ if (showHeader && move < -50) {
+ showHeader = false
+ headerAnim.start({
--- /dev/null
+++ b/adidas-landing.framerfx/code/App.tsx
@@ -0,0 +1,13 @@
+import { Override, useAnimation } from 'framer'
+
+// Override Docs: https://framer.com/docs/overrides
+window.log = console.log
+
+export function Scroll(): Override {
+ return {
--- a/material-button-types.framerfx/code/MaterialButton.tsx
+++ b/material-button-types.framerfx/code/MaterialButton.tsx
@@ -1,6 +1,12 @@
import * as React from 'react'
import { useState } from 'react'
-import { Frame, useCycle, addPropertyControls, ControlType } from 'framer'
+import {
+ Frame,
+ useCycle,
+ addPropertyControls,
--- a/material-button-types.framerfx/code/MaterialButton.tsx
+++ b/material-button-types.framerfx/code/MaterialButton.tsx
@@ -9,6 +9,20 @@ window.log = console.log
export function MaterialButton(props) {
const [hover, setHover] = useState(false)
+
+ const Circle = () => {
+ return (
+ <Frame
--- a/material-button-types.framerfx/code/MaterialButton.tsx
+++ b/material-button-types.framerfx/code/MaterialButton.tsx
@@ -1,4 +1,5 @@
import * as React from 'react'
+import { useState } from 'react'
import { Frame, useCycle, addPropertyControls, ControlType } from 'framer'
import './fonts.css'
@@ -7,11 +8,13 @@ import './fonts.css'
window.log = console.log
--- a/material-button-types.framerfx/code/MaterialButton.tsx
+++ b/material-button-types.framerfx/code/MaterialButton.tsx
@@ -45,7 +45,23 @@ export function MaterialButton(props) {
</Frame>
)
else if (props.type == 'contained')
- return <Frame background="green">{props.text}</Frame>
+ return (
+ <Frame
+ background="#6221EA"
--- a/material-button-types.framerfx/code/MaterialButton.tsx
+++ b/material-button-types.framerfx/code/MaterialButton.tsx
@@ -26,7 +26,24 @@ export function MaterialButton(props) {
</Frame>
)
else if (props.type == 'outlined')
- return <Frame background="red">{props.text}</Frame>
+ return (
+ <Frame
+ background=""
--- a/material-button-types.framerfx/code/MaterialButton.tsx
+++ b/material-button-types.framerfx/code/MaterialButton.tsx
@@ -1,5 +1,6 @@
import * as React from 'react'
import { Frame, useCycle, addPropertyControls, ControlType } from 'framer'
+import './fonts.css'
// Open Preview (CMD + P)
// API Reference: https://www.framer.com/api
@@ -7,7 +8,23 @@ window.log = console.log