
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-switchery
Advanced tools
A customizable, iOS-inspired animated switch component for React Native
An iOS-inspired, highly customizable switch component for React Native that runs seamlessly on iOS and Android with smooth thumb glides, elastic pill fill, and first-class accessibility support.
primary, info, success, warning, danger presets or override the colors directly.npm install react-native-switchery
# or
yarn add react-native-switchery
import React from 'react';
import { Switch } from 'react-native-switchery';
export const Demo = () => {
const [value, setValue] = React.useState(false);
return (
<Switch
value={value}
onValueChange={setValue}
variant="info"
size="small"
/>
);
};
| Prop | Type | Default | Description |
|---|---|---|---|
value | boolean | – | Controlled value of the switch. |
onValueChange | (value: boolean) => void | () => {} | Callback fired after a press toggles the value. |
variant | 'primary' | 'info' | 'success' | 'warning' | 'danger' | primary | Built-in palette presets (overridden by explicit colors). |
activeColor | string | variant color | Fill color when expanded. |
inactiveColor | string | variant color | Track color when collapsed. |
thumbColor | string | variant color | Thumb fill color. |
size | 'mini' | 'small' | 'default' | 'large' | default | Track/thumb preset dimensions. |
trackBorderColor | string | contextual | Outline color for the pill. |
trackBorderWidth | number | 1 | Outline width for the pill. |
thumbBorderColor | string | rgba(0,0,0,0.1) | Thumb outline color. |
thumbBorderWidth | number | 1 | Thumb outline width. |
disabled | boolean | false | Disables presses and shows a frosted overlay. |
testID | string | switch | Identifier for testing (overlay uses testID-disabled). |
accessibilityLabel | string | – | VoiceOver/TalkBack label. |
accessibilityHint | string | – | VoiceOver/TalkBack hint. |
MIT © Ehtisham Ali
FAQs
A customizable, iOS-inspired animated switch component for React Native
We found that react-native-switchery demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.