1. https://github.com/Kureev/react-native-blur
GitHub - Kureev/react-native-blur: React Native Blur component
React Native Blur component. Contribute to Kureev/react-native-blur development by creating an account on GitHub.
github.com
라이브러리를 이용한 blur 방법이다
해당 사이트의 문서를 참고하자
2. https://reactnative.dev/docs/0.65/image#blurradius
Image · React Native
A React component for displaying different types of images, including network images, static resources, temporary local images, and images from local disk, such as the camera roll.
reactnative.dev
Image component의 blurRadius를 사용하는 방법이다
<Image
source={require('blur.png')}
style={{
position: 'absolute',
width: '100%',
height: '100%',
}}
resizeMode="cover"
blurRadius={0}
/>
Image component라 source가 필요하다
그리고 blurRadius를 조절해보자(직접 해보면 이해됨)
3. https://reactnative.dev/docs/0.65/view
View · React Native
The most fundamental component for building a UI, View is a container that supports layout with flexbox, style, some touch handling, and accessibility controls. View maps directly to the native view equivalent on whatever platform React Native is running o
reactnative.dev
View component의 style을 사용하는 방법이다
<View
style={{
position: 'absolute',
width: '100%',
height: '100%',
backgroundColor: '#ffffff80', // white의 alpha값 50%
}}
/>
alpha값을 조절하여 비슷한 효과를 준다
'#ffffff80'은 '#rrggbbaa'이며 aa는 alpha값이다
alpha값 참고(https://success206.tistory.com/166)
끝.
'프로그래밍 > React Native' 카테고리의 다른 글
[React Native] iOS build commands failed (M1 mac) x86_64... (0) | 2022.09.08 |
---|---|
[React Native] I get the warning "Non-serializable values were found in the navigation state" 에러 (0) | 2022.08.13 |
[React Native] TextInput의 secureTextEntry 속성 적용 시 문제 (0) | 2022.04.14 |
[React Native] SVG 파일 사용 시, 터치이벤트 이슈 (0) | 2022.04.05 |
[React Native] 이미지를 .svg 파일로 적용하기 (0) | 2022.03.20 |
댓글