Text
React Native for web provides access to browser-only style properties. The following styles apply to any primitive that extends `TextViewStylePropTypes` like `<TextInput />`.
The API
Sets the length of empty space (indentation) that is put before lines of text in a block.
Type: number | string
number | string
Conversion
Sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('…
'), or display a custom string.
Type: string | 'each-line' | 'hanging' | Array<T>
string | 'each-line' | 'hanging' | Array<T>
Conversion
Provides information to the rendering engine about what to optimize for when rendering text. The browser makes trade-offs among speed, legibility, and geometric precision.
Type: 'auto' | 'geometricPrecision' | 'optimizeLegibility' | 'optimizeSpeed'
'auto' | 'geometricPrecision' | 'optimizeLegibility' | 'optimizeSpeed'
Conversion
The unicodeBidi
property, together with the direction
property, determines how bidirectional text in a document is handled. For example, if a block of content contains both left-to-right and right-to-left text, the user-agent uses a complex Unicode algorithm to decide how to display the text. The unicodeBidi
property overrides this algorithm and allows the developer to control the text embedding.
Type: 'normal','bidi-override','embed','isolate','isolate-override','plaintext'
'normal','bidi-override','embed','isolate','isolate-override','plaintext'
Conversion
Sets how white space inside an element is handled. Note: To make words break within themselves, use overflow-wrap
, word-break
, or hyphens
instead.
Type: string
string
Conversion
Sets whether line breaks appear wherever the text would otherwise overflow its content box.
Type: 'normal', 'break-all', 'break-word', 'keep-all'
'normal', 'break-all', 'break-word', 'keep-all'
Conversion
Applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box.
In CSS
word-wrap
is also known asoverflow-wrap
Type: 'normal' | 'anywhere' | 'break-word'
'normal' | 'anywhere' | 'break-word'
Conversion
Controls the application of anti-aliasing when fonts are rendered.
Type: string
string
Conversion
Last updated