Giter Site home page Giter Site logo

benjarier / framer-app-base Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 0.0 1.2 MB

A Framer module to create the base of an app with a flow component and a tab bar menu

License: MIT License

CoffeeScript 43.75% JavaScript 29.26% CSS 12.28% HTML 14.71%
framer framerjs framer-studio prototype

framer-app-base's Introduction

framer-app-base

A Framer module to create the base of an app with a flow component and a tab bar menu. When you tap on a menu item, it animates the switch between pages in the direction of the new page.

framer-app-base demo

Installation

  1. Download the appBase.coffee file
  2. Create a Framer project and add the file in /modules
  3. At the top of the Framer document write base = require "appBase"

Usage

create a new object appBase with the following arguments

  1. Array of layers for the different pages

  2. the header layers

  3. the tab bar layer. Its children are the tab elements. The tabs are layers initially in their selected state color, the module takes care of graying them out and keeping only the selected tab in color.

    new base.appBase([array of layers], header, menu)

Example

# Require the module
base = require "appBase"

# Create a series of layers that will become the pages
layer1 = new Layer
    backgroundColor: "#ffffff"
    size: Screen.size
text1 = new TextLayer
    text: "Page 1"
    textTransform: "uppercase"
    fontWeight: 700
    parent: layer1
    color: "#000000"
    x: Align.center
    y: Align.center

layer2 = new Layer
    backgroundColor: "#ffffff"
    size: Screen.size
text2 = new TextLayer
    text: "Page 2"
    textTransform: "uppercase"
    fontWeight: 700
    parent: layer2
    color: "#000000"
    x: Align.center
    y: Align.center

layer3 = new Layer
    backgroundColor: "#ffffff"
    size: Screen.size
text3 = new TextLayer
    text: "Page 3"
    textTransform: "uppercase"
    fontWeight: 700
    parent: layer3
    color: "#000000"
    x: Align.center
    y: Align.center

layer4 = new Layer
    backgroundColor: "#ffffff"
    size: Screen.size
text4 = new TextLayer
    text: "Page 4"
    textTransform: "uppercase"
    fontWeight: 700
    parent: layer4
    color: "#000000"
    x: Align.center
    y: Align.center

# Create the header
layerHeader = new Layer
    width: 750
    height: 40
    image: "images/statusbar.png"

# Create the menu
layerMenu = new Layer
    width: 750
    height: 103
    backgroundColor: "#f7f7f7"

# Create the menu elements
for i in [0...4]
    menuEl = new Layer
        parent: layerMenu
        width: 54
        height: 68
        image: "images/menuEL.png"
        y: 24
        x: 66 + 188*i

# Create the app base
new base.appBase([layer1,layer2,layer3,layer4], layerHeader, layerMenu)

License

Framer-app-base is released under the MIT license.

Contact

Twitter: @benjarier

framer-app-base's People

Contributors

benjarier avatar

Stargazers

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

Watchers

 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.