![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@splicer97/react-native-switch
Advanced tools
Custom Switch component for React Native that use Reanimated and Gesture Handler
Custom Switch component for React Native that use Reanimated and Gesture Handler
.
First, you need to install and configure the Reanimated and Gesture Handler libraries
Then install library
npm install @splicer97/react-native-switch
or
yarn add @splicer97/react-native-switch
import Switch from '@splicer97/react-native-switch';
// ...
const [state, setState] = useState(false);
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<View style={styles.container}>
<Switch value={state} onValueChange={setState} />
</View>
</GestureHandlerRootView>
);
Props | Type | Required | Description |
---|---|---|---|
value | boolean | true | Current state of the component |
onValueChange | (value: boolean) => void | true | Change of component state |
disabled | boolean | false | Inactive state of the component |
activeColor | string | false | Container color when component is active |
inactiveColor | string | false | Container color when component is inactive |
disabledActiveColor | string | false | Container color when component is active and disabled |
disabledInactiveColor | string | false | Container color when component is inactive and disabled |
shouldCancelWhenOutside | boolean | false | Should a swipe handler be end if your finger is outside the component. Default false |
containerStyle | StyleProp<ViewStyle> | false | Switch container style |
circleStyle | StyleProp<ViewStyle> | false | Switch circle style |
trackWidth | number | false | The width that the circle will be able to move. Default formula is 'containerWidth - circleWidth - containerPaddingHorizontal * 2' |
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library
FAQs
Custom Switch component for React Native that use Reanimated and Gesture Handler
The npm package @splicer97/react-native-switch receives a total of 74 weekly downloads. As such, @splicer97/react-native-switch popularity was classified as not popular.
We found that @splicer97/react-native-switch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.