Skip to main content

텍스트 스타일 속성

예제

참조

Props

color

타입
color

fontFamily

타입
string

fontSize

타입
number

fontStyle

타입
enum('normal', 'italic')

fontWeight

글꼴 두께를 지정한다. 대부분의 글꼴은 'normal''bold' 값을 지원한다. 모든 숫자 값에 대해 해당하는 글꼴 변형이 존재하지 않을 수 있으며, 이 경우 가장 가까운 값이 선택된다.

타입기본값
enum('normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900') 또는 숫자'normal'

includeFontPadding
Android

특정 상승자(ascenders)와 하강자(descenders)를 위한 공간을 확보하기 위해 추가된 폰트 패딩을 제거하려면 false로 설정한다. 일부 폰트의 경우 이 패딩이 있으면 텍스트가 수직으로 중앙 정렬되었을 때 약간 어긋나 보일 수 있다. 최적의 결과를 얻으려면 textAlignVerticalcenter로 설정한다.

타입기본값
booltrue

fontVariant

폰트의 다양한 변형을 설정할 수 있다. 'small-caps common-ligatures'와 같은 공백으로 구분된 문자열이나 열거형(enum) 배열을 사용해 지정할 수 있다.

타입기본값
열거형('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums') 배열 또는 문자열[]

letterSpacing

문자 간의 간격을 늘리거나 줄인다. 기본적으로 추가적인 문자 간격은 없다.

타입
number

lineHeight

텍스트 요소 내에서 줄 간의 세로 간격을 조절하는 숫자 값이다. 연속된 텍스트 줄의 기준선(baseline) 사이의 거리를 지정한다.

타입
number

textAlign

텍스트 정렬 방식을 지정한다. 안드로이드에서 'justify' 값은 오레오(8.0) 이상(API 레벨 >= 26)에서만 지원된다. 더 낮은 안드로이드 버전에서는 left로 대체된다.

타입기본값
enum('auto', 'left', 'right', 'center', 'justify')'auto'

textAlignVertical
Android

타입기본값
enum('auto', 'top', 'bottom', 'center')'auto'

textDecorationColor
iOS

타입
color

textDecorationLine

타입기본값
열거형('none', 'underline', 'line-through', 'underline line-through')'none'

textDecorationStyle
iOS

타입기본값
enum('solid', 'double', 'dotted', 'dashed')'solid'

textShadowColor

타입
color

textShadowOffset

타입
객체: {width?: number, height?: number}

textShadowRadius

타입
number

textTransform

타입기본값
enum('none', 'uppercase', 'lowercase', 'capitalize')'none'

verticalAlign
Android

타입기본값
열거형('auto', 'top', 'bottom', 'middle')'auto'

writingDirection
iOS

타입기본값
enum('auto', 'ltr', 'rtl')'auto'

userSelect

이 속성은 사용자가 텍스트를 선택하고 기본 복사 및 붙여넣기 기능을 사용할 수 있게 한다. selectable 속성보다 우선순위가 높다.

타입기본값
enum('auto', 'text', 'none', 'contain', 'all')none