# react-native-quick-controls

> React Native Quick Controls

Latest version **1.0.15** (published 2020-10-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-quick-controls
pnpm add react-native-quick-controls
yarn add react-native-quick-controls
bun add react-native-quick-controls
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.15 |
| Published | 2020-10-16 |
| First published | 2020-07-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 19.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | LkyYuen |
| Maintainers | lkyyuen |
| Keywords | react-native |

## Links

- npm: https://www.npmjs.com/package/react-native-quick-controls
- Repository: https://github.com/LkyYuen/react-native-quick-controls
- Homepage: https://github.com/LkyYuen/react-native-quick-controls#readme
- Issues: https://github.com/LkyYuen/react-native-quick-controls/issues
- npm.io page: https://npm.io/package/react-native-quick-controls

## Dependencies (2)

- [react-native-reanimated](https://npm.io/package/react-native-reanimated.md) ^1.9.0
- [react-native-orientation-locker](https://npm.io/package/react-native-orientation-locker.md) ^1.1.8

## Recent versions

- 1.0.15 (latest) — 2020-10-16
- 1.0.14 — 2020-08-25
- 1.0.13 — 2020-07-30
- 1.0.12 — 2020-07-30
- 1.0.11 — 2020-07-20
- 1.0.10 — 2020-07-17
- 1.0.9 — 2020-07-17
- 1.0.8 — 2020-07-17
- 1.0.7 — 2020-07-17
- 1.0.6 — 2020-07-17
- 1.0.5 — 2020-07-17
- 1.0.4 — 2020-07-16
- 1.0.3 — 2020-07-16
- 1.0.2 — 2020-07-15
- 1.0.1 — 2020-07-15
- … 1 more at https://npm.io/package/react-native-quick-controls/versions

## README

# react-native-quick-controls

## Getting started

`$ npm install react-native-quick-controls --save`

### Mostly automatic installation

`$ react-native link react-native-quick-controls`

## Usage
```javascript
import React from "react"
import { View, Text, Image } from "react-native"
import QuickControls from 'react-native-quick-controls';

const QuickControlsApp = props => {

    return (
        <QuickControls
            duration={300}
            landscapeStyle={{ marginTop: 20 }}
            viewMode={val => console.log(val)}
            portraitEndPoint={0.7}
            landscapeEndPoint={0.5}
            children={
                <View style={{ flex: 1 }}>
                    <Text>This is a children component</Text>
                </View>
            }
            parent={
                <Image 
                    style = {{ alignSelf: 'center', width: 25, height: 50, resizeMode: 'contain' }}
                    source = {{ uri: "https://cdn3.iconfinder.com/data/icons/o-shaped-flag-1/128/O_shaped_asian_flag-21-256.png" }}
                />
            }
            first_action={() => console.log("First action pressed!")}
            first_child={<Image 
                style = {{ alignSelf: 'center', width: 36, height: 36, resizeMode: 'contain' }}
                source = {{ uri: "https://cdn3.iconfinder.com/data/icons/o-shaped-flag-1/128/O_shaped_asian_flag-21-256.png" }}
            />}
            second_action={() => console.log("Second action pressed!")}
            second_child={<Image 
                style = {{ alignSelf: 'center', width: 36, height: 36, resizeMode: 'contain' }}
                source = {{ uri: "https://cdn3.iconfinder.com/data/icons/o-shaped-flag-1/128/O_shaped_asian_flag-27-128.png" }}
            />}
            third_action={() => console.log("Third action pressed!")}
            third_child={<Image 
                style = {{ alignSelf: 'center', width: 36, height: 36, resizeMode: 'contain' }}
                source = {{ uri: "https://cdn3.iconfinder.com/data/icons/o-shaped-flag-1/128/O_shaped_asian_flag-16-256.png" }}
            />}
        />
    )

}
```

## Props

Prop                  | Type      | Required | Default                   | Description
--------------------- | --------- | -------- | ------------------------- | -----------
parent                | component | Yes      |                           | The parent component
first_child           | component | Yes      |                           | The first child to show
first_action          | Action    | Yes      |                           | The action perform after first child clicked
second_child          | component | Yes      |                           | The second child to show
second_action         | Action    | Yes      |                           | The action perform after second child clicked
third_child           | component | Yes      |                           | The third child to show
first_action          | Action    | Yes      |                           | The action perform after third child clicked
duration              | milliseconds      | No       | 500                      | The duration of animation
portraitEndPoint      | double      | No       | 0.7                     | The limit of the menu can reached in portrait mode
landscapeEndPoint     | double      | No       | 0.5                     | The limit of the menu can reached in landscape mode
viewMode              | Function    | No       |                         | Callback function for screen mode changed
commonStyle           | [style](https://reactnative.dev/docs/text-style-props) | No      |                           | Common style for both portrait and landscape mode
portraitStyle           | [style](https://reactnative.dev/docs/text-style-props) | No      |                           | Style for portrait mode
landscapeStyle           | [style](https://reactnative.dev/docs/text-style-props) | No      |                           | Style for landscape mode

---

**MIT Licensed**

---
_Source: https://npm.io/package/react-native-quick-controls · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
