Skip to content

Instantly share code, notes, and snippets.

View onuro's full-sized avatar
🏠
Working from home

Onur Oztaskiran onuro

🏠
Working from home
View GitHub Profile
@onuro
onuro / stagger.jsx
Created June 17, 2023 23:04
Staggered Framer Animation Code Override
import type { ComponentType } from "react"
import { Children, cloneElement } from "react"
// Learn more: https://www.framer.com/docs/guides/overrides/
export function withStaggerChildren(Component): ComponentType {
return (props: any) => {
const { children } = props
const clonedChildren = Children.map(children, (child, index) =>
cloneElement(child, {
@onuro
onuro / framercontrols.js
Last active May 29, 2023 21:12
Standard Framer Controls
import { addPropertyControls, ControlType, RenderTarget } from "framer"
export const flexDirection = {
type: ControlType.SegmentedEnum,
title: "Direction",
options: ["row", "column"],
optionTitles: [
"⇆",
"⇅",
// @ts-ignore
@onuro
onuro / gist:e596fbde4eabfc15408cef3c97bb5893
Last active May 16, 2023 09:22
React Fetch JSON and return markup value example
// Welcome to Code in Framer
// Get Started: https://www.framer.com/docs/guides/
import React, { useEffect, useState } from "react"
const Card = (props) => {
const { user } = props
return (
<div>
81430cfbdd04a531528121a35f2950e8422429ab
@onuro
onuro / page_fadeout.js
Created December 26, 2018 15:10
Page Preload with FadeIn/FadeOut
/*! Fades out the whole page when clicking links */
$('a').click(function(e) {
e.preventDefault();
newLocation = this.href;
$('body').fadeOut('slow', newpage);
});
function newpage() {
window.location = newLocation;
}
@onuro
onuro / gist:4f778e3bb602d53a90e009fb7f4a92fe
Created December 16, 2018 20:21
Barba Disable link click on same page url
var getUrl = window.location;
var getHomeUrl = getUrl.protocol + "//" + getUrl.host;
$j('a[href="' + getHomeUrl + '"]').on('click', (event) => {
event.preventDefault();
// Barba.Pjax.goTo(getHomeUrl);
// console.log('click');
});