3

Creates an area that makes the sides or specific points snappable by the child

 1 year ago
source link: https://reactnativeexample.com/creates-an-area-that-makes-the-sides-or-specific-points-snappable-by-the-child/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Pointer

Creates an area that makes the sides or specific points snappable by the child

Jun 20, 2023 1 min read

react-native-snap-area

Creates an area that makes the sides or specific points snappable by the child

2023-06-18.18-03-53.mp4

Installation

npm install react-native-snap-area

Usage

import SnapArea from 'react-native-snap-area';

const snapPoints = [
  [1, 1],
  [1, 1, 1],
  [1, 1],
];
// Check out the example App.tsx file file to test it

function App() {
  return (
    <SnapArea snapPoints={snapPoints}>
      <View
        style={[
          styles.head,
          { backgroundColor: 'black' },
          childChanged ? { width: 75, height: 150 } : undefined,
        ]}
      />
    </SnapArea>
  )
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License


GitHub

View Github

Previous Post

Simple and fully modifiable OTP Input Component for React Native

You might also like...

Expose iPad mouse & track pads interactions to React Native
19 September 2021

Subscribe to React Native Example for Android and iOS

Get the latest posts delivered right to your inbox


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK