Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gohypergiant/RemoteLayer

A Framer module to generate an interactive Apple TV remote for tvOS app prototypes.
https://github.com/gohypergiant/RemoteLayer

Last synced: about 2 months ago
JSON representation

A Framer module to generate an interactive Apple TV remote for tvOS app prototypes.

Awesome Lists containing this project

README

        

# RemoteLayer Framer Module

[![license](https://img.shields.io/github/license/bpxl-labs/RemoteLayer.svg)](https://opensource.org/licenses/MIT)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](.github/CONTRIBUTING.md)
[![Maintenance](https://img.shields.io/maintenance/yes/2017.svg)]()

Install with Framer Modules

The RemoteLayer module allows you to instantly generate an interactive Apple TV remote for your tvOS app prototypes. You can choose your preferred styling, alignment, animation and button highlight color. All buttons (and swipes on the touchpad) can be configured to perform your own supplied actions.

RemoteLayer preview

### Installation

#### NPM Installation

```
$ cd /your/framer/project
$ npm i @blackpixel/framer-remotelayer
```

#### Manual Installation

Copy / save the `RemoteLayer.coffee` file into your project's `modules` folder.

### Adding It To Your Project

In your Framer project add the following:

```coffeescript
# If you manually installed
RemoteLayer = require "RemoteLayer"
# else
RemoteLayer = require "@blackpixel/framer-remotelayer"

myRemote = new RemoteLayer
```

### Assigning Actions to Buttons

```coffeescript
myRemote = new RemoteLayer
menuAction: ->
homeAction: ->
micAction: ->
playPauseAction: ->
volumeUpAction: ->
volumeDownAction: ->
clickAction: ->
swipeUpAction: ->
swipeDownAction: ->
swipeLeftAction: ->
swipeRightAction: ->
```

### API

#### `new RemoteLayer`

Instantiates a new instance of RemoteLayer.

**Available options**

```coffeescript
myRemote = new RemoteLayer
align: ("left" || "center" || "right")
margin:
fromBottom:
gloss:
transition: ("fade" || "pop")
hide:
autoHide:
highlightColor: (hex or rgba)
```

_Setting `autoHide` implicitly sets `hide` to true._

**Returns**

`Layer` _(Object)_: A newly instantiated Framer Layer.

#### `myRemote.show()`

Show the RemoteLayer instance.

#### `myRemote.hide()`

Hide the RemoteLayer instance.

#### `myRemote.align(align, margin, fromBottom)`

Useful if you wish to change the remote location some time after initialization.

**Arguments**

1. `align` _(String)_: One of ("left" || "center" || "right")
2. `margin` _(Number)_: Layer margin value
3. `fromBottom` _(Number)_: Distance from bottom of screen

#### `myRemote.hidden`

> readonly

**Returns**

_(Boolean)_: Whether or not the RemoteLayer is currently hidden

### Example project
[Download](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/bpxl-labs/RemoteLayer/tree/master/example.framer) the example to try it for yourself.

---

Website: [blackpixel.com](https://blackpixel.com)  · 
GitHub: [@bpxl-labs](https://github.com/bpxl-labs/)  · 
Twitter: [@blackpixel](https://twitter.com/blackpixel)  · 
Medium: [@bpxl-craft](https://medium.com/bpxl-craft)