Giter Site home page Giter Site logo

abhishekkhandait / react-assistivetouch-menu Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 5.0 882 KB

iOS inspired assistive touch menu built with React

Home Page: https://abhishekkhandait.github.io/react-assistivetouch-menu/

License: MIT License

TypeScript 75.73% CSS 13.52% JavaScript 10.74%
react reactjs react-component assistive assistivetouch typescript reactjs-typescript menu-navigation webpack ios

react-assistivetouch-menu's Introduction

React Assistivetouch Menu

React assistivetouch menu is a react component inspired from iOS assitivetouch.

npm badge Node.js CI Known Vulnerabilities travis-ci badge downloads badge FOSSA Status hound badge

Assistive touch Menu

JS Example | TypeScript Example

Installation

The easiest way to use react-select is to install it from npm and build it into your app with Webpack.

yarn add react-assistivetouch-menu

or

npm install react-assistivetouch-menu --save

or

<script src="https://unpkg.com/[email protected]/dist/index.js"></script>

Usage

import React from "react";
import ReactDOM from "react-dom";
import { AssistiveTouch } from "react-assistivetouch-menu";

function getMenuItems() {
  return [{
      icon: <div className="menuitem">โ˜…</div>,
      label: "Custom"
    },{
      icon: <div className="menuitem">๐Ÿ–</div>,
      label: "Gestures"
    },{
      icon: <div className="menuitem">โŠ•</div>,
      label: "Add"
    },{
      icon: <div className="menuitem">๐Ÿ˜ด</div>,
      label: "Snooze"
    },{
      icon: <div className="menuitem">๐ŸŸ</div>,
      label: "Fries"
    },{
      icon: <div className="menuitem">๐Ÿ™‹</div>,
      label: "Hey"
    }];
}

function App() {
  return (
    <AssistiveTouch size="L" behaviour="snapToSides" initialPos={{ left: 0, top: 200 }} menuItems={getMenuItems()}
    />
  );
}

const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);

Props

prop type description
menuItems array Array of items to be added to menu. item is object having 2 properties. 'icon' which has to be a JSX Element and label for the icon. Ex. menuItems=[{icon: <ABC></ABC>, label: 'ABC'}]
behaviour `'snapToSides' 'freeflow'`
size `'XS' 'S'
initialPos object Specify the initial position of menu ball. Position has to be passed as object {left: number, top: number}. Default: {left: 0, top: 0}

Development

Build

  1. yarn
  2. yarn build

Debug

To debug you can run demo app and test your changes over it. Just run yarn start:demo which will fire up dev server on http://localhost:9000 for testing and debugging the component.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT License Copyright (c) 2019 Abhishek Khandait

FOSSA Status

react-assistivetouch-menu's People

Contributors

abhishekkhandait avatar fossabot avatar greenkeeper[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-assistivetouch-menu's Issues

An in-range update of @types/react is breaking the build ๐Ÿšจ

The devDependency @types/react was updated from 16.8.19 to 16.8.20.

๐Ÿšจ View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/react is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • โœ… continuous-integration/travis-ci/push: The Travis CI build passed (Details).
  • โŒ continuous-integration/travis-ci/pr: The Travis CI build could not complete due to an error (Details).
  • โŒ Travis CI - Pull Request: The build errored. This is a change from the previous build, which passed.
  • โœ… Travis CI - Branch: The build passed.

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

Action required: Greenkeeper could not be activated ๐Ÿšจ

๐Ÿšจ You need to enable Continuous Integration on Greenkeeper branches of this repository. ๐Ÿšจ

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didnโ€™t receive a CI status on the greenkeeper/initial branch, itโ€™s possible that you donโ€™t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how itโ€™s configured. Make sure it is set to run on all new branches. If you donโ€™t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, youโ€™ll need to re-trigger Greenkeeperโ€™s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

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.