Skip to content

Instantly share code, notes, and snippets.

@perrysmotors
perrysmotors / ScrollEffects.tsx
Last active June 20, 2024 21:07
Overrides to create scroll interactions on Framer sites
import type { ComponentType } from "react"
import { useState, useEffect } from "react"
import type { MotionValue, Transition } from "framer-motion"
import {
useScroll,
useVelocity,
useTransform,
useMotionValue,
animate,
@netgfx
netgfx / AirTableApi.tsx
Last active April 11, 2024 11:16
Framer Airtable API
import { ComponentType, useEffect } from "react"
import { createStore } from "https://framer.com/m/framer/store.js@^1.0.0"
import { randomColor } from "https://framer.com/m/framer/utils.js@^0.9.0"
import Furniture_card from "../canvasComponent/em5g0kT7d"
import _ from "lodash"
import { Color, motion } from "framer"
// Learn more: https://www.framer.com/docs/guides/overrides/
// Uses this template: https://www.airtable.com/templates/featured/expZvMLT9L6c4yeBX/product-catalog
@neiljohnston
neiljohnston / FontAwesomeFont.tsx
Last active May 16, 2022 15:16
Include Font Awesome in Framer as a Code Component
import * as React from "react"
import { Frame, addPropertyControls, ControlType } from "framer"
import { motion } from "framer-motion"
async function importScripts() {
let script = document.createElement("script")
script.id = "font-awesome-fonts-script"
// create a fontawesome kit: https://fontawesome.com/start
script.src = "https://kit.fontawesome.com/KIT_ID_HERE.js"
script.crossOrigin = "anonymous"
@addisonschultz
addisonschultz / generatePropertyControls.ts
Last active July 15, 2023 23:17
Reuse Property Controls easily in Framer X
import { ControlType, PropertyControls } from "framer";
export function generatePropertyControls(
options: {
hidden?: (props: any) => boolean;
omittedProperties?: string[];
} = {}
): PropertyControls {
const properties: PropertyControls = {
// Property Controls go here
@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()
@tatianamac
tatianamac / tatiana-mac-speaker-rider.md
Last active March 24, 2024 12:22
Tatiana Mac's Speaker Rider

Speaker Rider

by Tatiana Mac

Last updated 14 April 2021

What is a speaker rider?

As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.

Considerations

😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.

@davo
davo / Colors.tsx
Created May 21, 2019 21:38
Reusing Framer X Shared Colors on a Function Component
import * as React from 'react'
import { Stack, Frame } from 'framer'
import { colors } from './canvas'
export function Colors() {
const [colorsTokens] = React.useState(() => {
return Object.keys(colors).map(key => colors[key])
})
return (
@mackuba
mackuba / wwdc15.md
Last active August 6, 2022 17:28
New stuff from WWDC 2015

Here's my own list of the interesting stuff announced during this year's WWDC, collected from the keynotes, various Apple docs, blog posts and tweets.

If you're planning to watch the videos, I really recommend this Mac app that helps you download and watch them: https://github.com/insidegui/WWDC.

OS X El Capitan

http://www.apple.com/osx/elcapitan-preview/

  • split view - two apps side by side on full screen
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@io41
io41 / paginated_collection.js
Created February 22, 2011 10:10 — forked from zerowidth/paginated_collection.js
Pagination with Backbone.js
// includes bindings for fetching/fetched
var PaginatedCollection = Backbone.Collection.extend({
initialize: function() {
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage');
typeof(options) != 'undefined' || (options = {});
this.page = 1;
typeof(this.perPage) != 'undefined' || (this.perPage = 10);
},
fetch: function(options) {