Kind: global class
Npmpackage:
- TextFormat
- new TextFormat()
- .INLINE :
string
- .INLINE_CLAMP :
string
- .INLINE_FIT :
string
- .INLINE_FIT_CLAMP :
string
- .PARAGRAPH :
string
- .PARAGRAPH_CLAMP :
string
- .PARAGRAPH_FIT :
string
- .PARAGRAPH_FIT_CLAMP :
string
Custom constants to identify the layout type for a . Each type changes the format of how the text content
is displayed and will run an internal auto size if applicable to the type.
Import from ad-ui
import { TextFormat } from 'ad-ui'
UITextField lays out the words inline with no word wrapping, which does not necessarily mean only 1 line.
If html <br> tags are used, they will be honored, but no autmatic line breaking happens.
This does NOT auto size and will overflow horizontally and vertically depending on the width and height.
Kind: static constant of TextFormat
Example
TextFormat.INLINE
UITextField lays out the words inline with no word wrapping, which does not necessarily mean only 1 line.
If html <br> tags are used, they will be honored, but no autmatic line breaking happens.
This does NOT auto size, however it changes the width AND height of the UITextField to clamp to the size of the content.
Kind: static constant of TextFormat
Example
TextFormat.INLINE_CLAMP
UITextField lays out the words inline with no word wrapping, which does not necessarily mean only 1 line.
If html <br> tags are used, they will be honored, but no autmatic line breaking happens.
This DOES auto size and will shrink horizontally and vertically to fit inside the width and height.
Kind: static constant of TextFormat
Example
TextFormat.INLINE_FIT
This is a combination that applies TextFormat.INLINE_FIT followed by TextFormat.INLINE_CLAMP
would then become
Kind: static constant of TextFormat
Example
TextFormat.INLINE_FIT_CLAMP
UITextField uses word wrapping to automatically break lines creating a paragraph layout.
This does NOT auto size and will overflow vertically, just like a webpage.
Kind: static constant of TextFormat
Example
TextFormat.PARAGRAPH
UITextField uses word wrapping to automatically break lines creating a paragraph layout.
This does NOT auto size and will overflow vertically, just like a webpage.
However, while maintaining the defined width, it changes the height of the UITextField to clamp to the size of the content.
Kind: static constant of TextFormat
Example
TextFormat.PARAGRAPH_CLAMP
UITextField uses word wrapping to automatically break lines creating a paragraph layout.
This DOES auto size and will shrink the entire chunk to fit inside the width and height.
Kind: static constant of TextFormat
Example
TextFormat.PARAGRAPH_FIT
This is a combination that applies TextFormat.PARAGRAPH_FIT followed by TextFormat.PARAGRAPH_CLAMP
would then become
Kind: static constant of TextFormat
Example
TextFormat.PARAGRAPH_FIT_CLAMP