# react-native-tutorial-overlay

> A React Native layer component to build app tutorials

Latest version **0.1.1** (published 2021-07-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-tutorial-overlay
pnpm add react-native-tutorial-overlay
yarn add react-native-tutorial-overlay
bun add react-native-tutorial-overlay
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2021-07-21 |
| First published | 2021-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 25.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | jorgefortunatof |
| Maintainers | jorgefortunatof |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-tutorial-overlay
- Repository: https://github.com/jorgefortunatof/react-native-tutorial-overlay
- Homepage: https://github.com/jorgefortunatof/react-native-tutorial-overlay#readme
- Issues: https://github.com/jorgefortunatof/react-native-tutorial-overlay/issues
- npm.io page: https://npm.io/package/react-native-tutorial-overlay

## Dependencies (1)

- [react-native-svg](https://npm.io/package/react-native-svg.md) ^12.1.1

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2021-07-21
- 0.1.0 — 2021-07-21

## README

# React Native Tutorial Overlay

A React Native layer component to build tutorials.

<img src="https://github.com/jorgefortunatof/react-native-tutorial-overlay/blob/master/screenshot.png" alt="screenshot" width="280"/>

## ‣ Installation
- First if you are using a bare React Native project you are going to need to install `react-native-svg`

```jsx
npm install react-native-svg
```

- Then install `react-native-tutorial-overlay` (if you are using expo you can just install `react-native-tutorial-overlay`)

```
npm install react-native-tutorial-overlay
```

## ‣ Usage Example
```jsx
import { View, Text, StyleSheet } from 'react-native';
import TutorialOverlay from "react-native-tutorial-overlay";

export default function App() {
  return (
    <View style={styles.container}>
      <View style={styles.taskContainer}>
        <Text style={styles.taskTitle}>#01 - Task</Text>
        <Text style={styles.taskDescription}>
          build your app first steps tutorial
        </Text>
      </View>
      <View style={styles.taskContainer}>
        <Text style={styles.taskTitle}>#02 - Task</Text>
        <Text style={styles.taskDescription}>finish task 01</Text>
      </View>

      <TutorialOverlay x="10" y="80" width="95%" height="120" shape="rectangle">
        <View style={styles.tutorialContainer}>
          <Text style={styles.tutorialText}>Here you can check your tasks</Text>
        </View>
      </TutorialOverlay>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    marginTop: 90,
    paddingHorizontal: 20,
  },
  taskContainer: {
    height: 100,
    marginBottom: 20,
    padding: 20,
    backgroundColor: '#FF6B6B',
  },
  taskTitle: {
    fontSize: 24,
    color: '#fff',
  },
  taskDescription: {
    fontSize: 14,
    color: '#fff',
  },

  tutorialContainer: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
  tutorialText: {
    color: 'white',
    fontSize: 20,
  },
});
```

## ‣ All Properties

| Prop                  | Default Value        | Type              | Description                                            |
| --------------------- | -------------------- | ----------------- | ------------------------------------------------------ |
| **`shape`**           | `circle`             | `string`          | shape of the hole                                      |
| **`x`**               | `0`                  | `number / string` | x position of the role                                 |
| **`y`**               | `0`                  | `number / string` | y position of the role                                 |
| **`width`**           | `100`                | `number / string` | width of rectangle (only for `rectangle` shape)        |
| **`height`**          | `100`                | `number / string` | height of rectangle (only for `rectangle` shape)       |
| **`radius`**          | `100`                | `number`          | radius of circle (only for `circle` shape)             |
| **`borderRadius`**    | `10`                 | `number`          | border radius of the hole (only for `rectangle` shape) |
| **`backgroundColor`** | `rgba(0, 0, 0, 0.9)` | `string`          | background color of the overlay                        |


## ‣ Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## ‣ License

MIT

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