0.8.1 • Published 4 years ago

react-native-overlay-coach-mark v0.8.1

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

react-native-overlay-coach-mark

A React Native UI component for coach mark, which is often used in tutorial.

c0981b1373b37c149fb80433951a4676

Install

npm install react-native-overlay-coach-mark

for bare React Native
Need to install react-native-svg. If you are using Expo, you can skip this as Expo comes with react-native-svg.

npm install react-native-svg
cd ios && pod install

Usage

circle

import CoachMark from 'react-native-overlay-coach-mark';

export default function App() {
  return (
    <>
      <CoachMark
        shape="circle"
        x={100}
        y={200}
        radius={30}
      />
    <>
  )
}

rect

import CoachMark from 'react-native-overlay-coach-mark';

export default function App() {
  return (
    <>
      <CoachMark
        shape="rect"
        x={100}
        y={200}
        width={80}
        height={40}
      />
    <>
  )
}

Properties

PropDefaultTypeDescription
shape-stringshape of the hole
x-numberhole position of x direction
y-numberhole position of y direction
backgroundColor#000stringbackground color of overlay
opacity0.7numberopacity of background overlay
width100numberwidth of rectangle (* only for rect shape)
height100numberheight of rectangle (* only for rect shape)
borderRadius10numberborder radius of rectangle (* only for rect shape)
radius100numberradius of circle (* only for circle shape)

Example

See more detail in example directory.

https://github.com/takahi5/react-native-overlay-coach-mark/tree/main/example

License

MIT License.