https://reactnative.dev/docs/scrollview
ScrollView · React Native
Component that wraps platform ScrollView while providing integration with touch locking "responder" system.
reactnative.dev
import {View, ScrollView} from 'react-native';
export default function App() {
return (
<View>
<ScrollView>
// 이곳의 컴포넌트들은 scroll 처리 된다.
</ScrollView>
</View>
)
}
Props
- horizontal : 수평 스크롤 모드 (기본 false)
- [IOS] indicatorStyle : 스크롤바 스타일 지정
- pagingEnabled : 스크롤이 페이지 단위로 넘어가도록 지정 (기본 false)
- showsHorizontalScrollIndicator : 수평 스크롤 바 display 여부 지정 (기본 true)
- showsVerticalScrollIndicator : 수직 스크롤 바 display 여부 지정 (기본 true)
- contentContainerStyle : 일반 style로 지정 할 경우 다른 컴포넌트들과 style이 어울리지 않기 때문에 이를 해소해 주기 위해 사용
'FrontEnd > React Native' 카테고리의 다른 글
[react native] 텍스트 입력 textInput (0) | 2023.02.25 |
---|---|
[react native] 터치 이벤트 컴포넌트 (0) | 2023.02.25 |
[react native] 위치정보 가져오기 (expo) (0) | 2023.02.25 |
[react native] 화면 크기 가져오기 (0) | 2023.02.24 |
[react native] 프로젝트 생성 (expo) (0) | 2023.02.24 |