Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-native-toggle-input
Advanced tools
⭐ Customizable toggle button input for React Native and Expo
Toggle Input Demo
iOS | Android | Web | Expo |
---|---|---|---|
✅ | ✅ | ✅ | ✅ |
$ npm install react-native-toggle-input
OR
$ yarn add react-native-toggle-input
import Toggle from 'react-native-toggle-input'
const App = () => {
const [toggle, setToggle] = React.useState(false);
return(
<Toggle toggle={toggle} setToggle={setToggle} />
)
};
For Live Demo
(Expo Snack)
Name | Type | Description |
---|---|---|
color | String | Color of the toggle switch (Optional) |
size | Number | Size of the toggle switch (Optional) |
filled | boolean | If you want to use filled toggle switch set it to true (Optional) |
circleColor | String | Use the color you want to give to the circle inside swith (Required for filled switch) |
toggle | boolean | Default value of the toggle switch (Required) |
setToggle | Function | Pass the function that will be used to set toggle status (Required) |
onTrue | Function | Pass the function that will executed after the switch has been turned on |
onFalse | Function | Pass the function that will executed after the switch has been turned off |
import Toggle from 'react-native-toggle-input'
const App = () => {
const [toggle, setToggle] = React.useState(false);
return(
<Toggle
color={"#4C956C"}
size={30}
filled={true}
circleColor={"white"}
toggle={toggle}
setToggle={setToggle}
/>
)
};
Toggle Input Filled Demo
For Live Demo
(Expo Snack)
FAQs
⭐ Customizable toggle button input for React Native and Expo
The npm package react-native-toggle-input receives a total of 72 weekly downloads. As such, react-native-toggle-input popularity was classified as not popular.
We found that react-native-toggle-input 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.