Skip to main content
Version: Next

텍스트 스타일 속성

예제

참조

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

특정 상승부/하강부를 위한 여백을 제거하려면 false로 설정한다. 일부 폰트에서는 이 패딩이 세로 중앙 정렬 시 텍스트가 약간 어긋나 보이게 할 수 있다. 최상의 결과를 얻으려면 textAlignVerticalcenter로 설정한다.

타입기본값
booltrue

fontVariant

폰트의 모든 변형을 설정할 수 있다. 열거형 배열이나 공백으로 구분된 문자열을 사용해 지정할 수 있다. 예를 들어 'small-caps common-ligatures'와 같이 설정한다.

타입기본값
열거형('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

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

textDecorationColor
iOS

타입
색상

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

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

writingDirection
iOS

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

userSelect

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

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