Giter VIP home page Giter VIP logo

material-framer's Introduction

An unofficial module for prototyping material design in Framer.

Instructions

  1. Drop material.coffee in the modules directory of your Framer project. This requires Framer Studio v1.11.1 or higher.
  2. Add material = require 'material' to the top of your prototype file.

Examples

material = require 'material'

Framer.Defaults.Animation = 
	curve: material.transformCurve
	time: 0.3

button1 = new material.Button 'Open dialog', backgroundColor: '#e91e63', width: 200
button2 = new material.Button 'This button is auto-sized', fit: true

card = new material.Card width: 320, height: 200

progressBar = new material.ProgressBar originY: 0, fillColor: '#ff5722', backgroundColor: '#ffccbc'
progressBar.style.width = '100%'

# this ripple is based on a tap position
card.on Events.TouchStart, (event) ->
	origin =
		x: event.offsetX + @screenFrame.x
		y: event.offsetY + @screenFrame.y
	ripple = new material.Ripple origin: event, container: card, color: '#fff'
	Framer.Device.screen.once Events.TouchEnd, () =>
		ripple.remove()

# this ripple is centered on the toolbar icon but contained in the toolbar
toolbarIcon.on Events.TouchStart, ->
	origin =
		x: @screenFrame.x + @width / 2
		y: @screenFrame.y + @height / 2
	ripple = new material.Ripple origin: origin, container: toolbar, radius: 96
	Framer.Device.screen.once Events.TouchEnd, () =>
		ripple.remove()

material-framer's People

Contributors

cleercode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

1xmac helloatilla

material-framer's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.