Giter Club home page Giter Club logo

stickystamps-for-framer's Introduction

StickyStamps-for-Framer

A module to create scroll components with sticky stamps in Framer.

Examples

  • Example 1 - Prototype with scrollImage.
  • Example 2 - Prototype without scrollImage, (focus on sticky stamps).
  • Example 3 - Prototype without scrollImage, (focus on sticky stamps).

Installation

  1. Create a new Framer project.
  2. Download StickyStamps.coffee and put it in the modules folder.
  3. Add this line at the top of your document.
{StickyStamps} = require "StickyStamps"

How to use

This is the basic usage to create a new scroll with sticky stamps.

myScroll = new StickyStamps
	data: dataSet
	scrollImage: "images/list-day1.png"
	scrollHeight: 4000

About basic attributes

Let's explain what each attribute is for, and what type of data should be passed on.

  • data: Expects an array with the info needed to create the stamps. Each item in the array must be structured like this:
    • y: Stamp's initial Y position. (Get this value from your design comp).
    • labelText: Content for stamp's main label.
    • subLabelText: Content for stamp's sublabel. If you don't need a subLabel, add it to the array but leave its value empty.
dataSet = [
	{"y":50,  "labelText":"9:30", "subLabelText":"AM"}, 
	{"y":210, "labelText":"12:00", "subLabelText":"PM"},
	#and so on...
]
  • scrollImage: This is the path to your scroll image. Export the image from your design comp without the stamps (these will be created dynamically from the array).

  • scrollHeight: This number is the height of your scroll image. The module uses this value to determine the constrains of the scroll component.

About extra attributes

This is an example of a more robust usage for this module. Here we are using 3 new attributes: labelStyle, subLabelStyle and stampHeight.

myScroll = new StickyStamps
	data: dataSet
	labelStyle: mainLabel
	subLabelStyle: subLabel
	stampHeight: 220
	scrollImage: "images/list-day1.png"
	scrollHeight:4000
  • labelStyle & subLabelStyle: Use these attributes to set the style of the stamps. Replicate the style from your design with CSS.
mainLabel =
	backgroundColor: "transparent"
	color: "#000"
	fontFamily: "Avenir"
	fontSize: "32px"
	fontWeight: "500"
	textAlign: "left"
	marginLeft: "40px"
	height: "100px"
	width: "130px"
subLabel =
	backgroundColor: "transparent"
	color: "gray"
	fontFamily: "Avenir"
	fontSize: "28px"
	fontWeight: "500"
	marginTop: "12px"
	textAlign: "left"
  • stampHeight: Even if you use a height value in your mainLabel styleset, the stampHeight attribute is the one the module uses as a reference to determine the "collision" between two stamps. (Defaults to 100)

Planning your prototype

Make sure to plan ahead what you need to show in your prototype. My workflow is:

  • Design a complete scroll with stamps and list items in Sketch or Photoshop.
  • Export the scroll as a .png without the stamps (just group the stamps in one layer and turn it off).
  • Put the .png in the images folder inside the Framer projet.
  • Install this module.
  • Refer to the design comp to get the values needed to create the stamps: array for data (y, labelText, subLabelText) and styles (CSS) for labelStyle and subLabelStyle.

Medium - Unlocking ideas with Framer Studio - See this module in action in one of the projects I was working on.

##Contact Twitter: @72mena

stickystamps-for-framer's People

Contributors

72 avatar

Watchers

James Cloos avatar Vicky Yang avatar

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.