Skip to content
项目

关于

Create Framer (https://framer.com) prototypes using React (https://reactjs.org/)

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

React Framer

This is a React renderer for Framer! You can write React components that render Framer layers.

You can try it out in your browser using this codepen template: https://codepen.io/pen?template=BJjyMR

Or play with this more fully-featured HSL color-picker prototype (originally written by the Framer team): https://dabbott.github.io/react-framer/example

This project is a proof-of-concept and is missing a lot of React/Framer features. I'm not sure how well it works with Framer Studio, if at all.

Why?

Framer is great for interaction design. React is great for building complex UIs. Why not combine the two and get the best of both worlds?

A react-framer component looks something like this:

const Label = ({ text }) => (
  <Layer
    x={Align.center}
    y={Align.center}
    height={46}
    width={200}
    backgroundColor={"rgba(0,0,0,0.5)"}
    borderRadius={100}
  >
    <Text
      x={Align.center}
      y={Align.center}
      width={200}
      text={text}
      color={"white"}
      fontSize={17}
      fontWeight={600}
      textAlign={"center"}
      lineHeight={46}
    />
  </Layer>
);

To see more, check out the color-picker example code: https://github.com/dabbott/react-framer/blob/master/example/app.js

Instructions

Make sure you have yarn installed and run:

yarn
yarn build

Then, open example/index.html in Chrome/Safari to preview the sample app.

Hacking

Run the webpack dev server with:

yarn dev

Then, navigate to http://localhost:8081/example/ in Chrome/Safari to preview the sample app.

探索相关项目

加载中…