Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
react-native-inkwell
Advanced tools
A material touchable area that provides the ripple effect. Inspired by the InkWell Flutter component.
You need to have already installed the following packages:
Open a Terminal in your project's folder and install the library using yarn
:
yarn add react-native-inkwell
or with npm
:
npm install react-native-inkwell
import InkWell from 'react-native-inkwell';
const YourRippleButton = () => (
<InkWell
style={{
width: 200,
height: 200,
backgroundColor: 'white',
}}
contentContainerStyle={{
alignItems: 'center',
justifyContent: 'center',
}}
onTap={() => {
console.log('tapped');
}}
>
<Text>Tap Here</Text>
</InkWell>
);
enabled?: boolean
Indicates whether InkWell should be active or not.
Default: true
.
radius?: number
Decides the maximum radius of the Ripple Effect. By default the Ripple effect will determine the radius from the height and width of the component so that it can expand as much as possible.
onTap?: () => void
Called when the InkWell is clicked. If the onDoubleTap callback is not specified, onTap will be called immediately, otherwise it will be called after maxDelayMs.
onTapDown?: () => void
Called when the user taps down the InkWell.
onTapCancel?: () => void
Called when the user cancels a tap.
onDoubleTap?: () => void
Called when the InkWell is clicked two consecutive times in less than maxDelayMs.
onLongPress?: () => void
Called when the component is pressed for more than minDurationMs.
maxDelayMs?: number
This property is inherited from maxDelayMs of the react-native-gesture-handler's TapGestureHandler.
Default: 500
minDurationMs?: number
This property is inherited from minDurationMs of the react-native-gesture-handler's LongPressGestureHandler.
Default: 500
scaleDuration?: number
The duration of ink scale animation.
Default: depends on the component's width and height.
easing?: Animated.WithTimingConfig["easing"]
The Reanimated EasingFunction.
Default: Easing.bezier(0.25, 0.5, 0.4, 1.0)
splashColor?: string
The splash color of the ripple effect.
Default: rgba(0,0,0,0.1)
;
highlightColor?: string
The backgroundColor of the View when the InkWell is activated.
Default: rgba(0,0,0,0.03)
;
style?: StyleProp<ViewStyle>
contentContainerStyle?: StyleProp<ViewStyle>
The React Native style of the content.
children?: React.ReactNode
The component that could be contained in the InkWell.
simultaneousHandlers and waitFor
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
FAQs
A material touchable area that provides the ripple effect
The npm package react-native-inkwell receives a total of 0 weekly downloads. As such, react-native-inkwell popularity was classified as not popular.
We found that react-native-inkwell 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
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.