Skip to content

Instantly share code, notes, and snippets.

View steveruizok's full-sized avatar
🏠

Steve Ruiz steveruizok

🏠
View GitHub Profile
@steveruizok
steveruizok / learn-changelog.md
Created September 1, 2019 05:10
An (un-dated) changelog for the Learn Design System package on the Framer X Store. Oops.
  • Filter falsey entries from List content
  • Fixes scroll bug on Map
  • Adds Icon to Button
  • Adds resizable Text Input
  • Fixes spacing on Navigation Bar
  • Fixes clear on Text Input
  • Adds Favorite to row item
  • Adds colors to sliders
  • Adds TextArea
  • Adds scroll prop to List
@steveruizok
steveruizok / App.tsx
Created August 18, 2019 19:56
Radial drag constraints in Framer X / Framer Motion.
import { Override, motionValue, useAnimation } from 'framer'
const x = motionValue(0)
const y = motionValue(0)
export function Knob(): Override {
const maxRadius = 32
const overDrag = 0.25
const animation = useAnimation()
@steveruizok
steveruizok / useStickyHeader.ts
Created August 8, 2019 18:45
A sticky header hook for a Framer X scroll component.
import * as React from "react"
import { useTransform, MotionValue } from "framer"
export function useStickyHeader(scrollY: MotionValue<number>) {
const ref = React.useRef<HTMLElement>()
const top = React.useRef<number>()
React.useEffect(() => {
top.current = ref.current.offsetTop
}, [])
@steveruizok
steveruizok / useScrollHeader.ts
Last active May 13, 2022 06:36
A Framer X hook to hide or show a header based on a scroll position.
import * as React from "react"
import {
Override,
motionValue,
transform,
useTransform,
MotionValue,
} from "framer"
type States = "open" | "closed" | "opening" | "closing"
@steveruizok
steveruizok / App.tsx
Last active July 19, 2019 16:25
Page Navigation in Framer X.
import { Override } from "framer"
import { setCurrentPage } from "./Nav"
export function Page1Button(): Override {
return {
onTap: () => setCurrentPage(1)
}
}
export function Page2Button(): Override {
import * as React from 'react'
import {
Stack,
StackProperties,
addPropertyControls,
ControlType,
} from 'framer'
//@ts-ignore
import { default as MuiButton, ButtonProps } from '@material-ui/core/Button'
import * as React from "react"
import {
Stack,
StackProperties,
addPropertyControls,
ControlType,
} from "framer"
import {
default as MuiCheckbox,
CheckboxProps,
@steveruizok
steveruizok / App.tsx
Created July 12, 2019 14:18
The App.tsx file for the RGB LED example.
import { Override, Data } from "framer"
import { connectToHost } from "./Client"
// Socket
const serverUrl = "http://localhost:8080"
const responses = {
CONNECT: () => console.log("Connected"),
DISCONNECT: () => console.log("Disconnected"),
@steveruizok
steveruizok / index.js
Created July 12, 2019 14:05
The Arduino project's file for the RGB LED example.
var { connectToHost } = require('./client')
var five = require('johnny-five')
var board = new five.Board()
var rgbHex = require('rgb-hex')
function main() {
// Connection
const serverUrl = 'http://localhost:8080'
@steveruizok
steveruizok / download-web-preview.md
Created July 11, 2019 07:30
Framer X Support - Download Web Preview on iOS

Download Web Preview projects on iOS

You can use the Framer Preview app for iOS to download Framer X web previews for offline viewing.

To download your preview:

  1. Open your project in Framer X.
  2. Export a web preview.
  3. Upload the exported folder to the web — either on your own server or using a service like Netlify Drop.
  4. Copy the hosted URL to your iOS device’s clipboard. (You might have to send yourself the link first).
  5. On your iOS device, open the Framer Preview app.