Skip to content

Latest commit

 

History

History
110 lines (84 loc) · 1.59 KB

font.md

File metadata and controls

110 lines (84 loc) · 1.59 KB

This style control the Font

font-size

support pixel value

Usage

const style = {
    "font-size": "20px",
}

text-color

Sets the color of the Text Component

Usage

const style = {
    "text-color": "blue",
}

letter-spacing

sets the horizontal spacing behavior between text characters

Usage

const style = {
    "letter-spacing": "3px",
}

line-spacing

sets the horizontal spacing behavior between text line

Usage

const style = {
    "line-spacing": "3px",
}

text-overflow

sets the desired behavior for an Text component's overflow

Value

property with the following value

  • ellipsis, p the size and write dots at the end if the text is too long
  • clip, Keep the size and clip the text out of it
  • auto, Keep the object width, wrap the too long lines and expand the object height
  • scroll, Keep the size and roll the text back and forth
  • circular, Keep the size and roll the text circularly

Usage

const style = {
    "text-overflow": "clip",
}

text-align

sets the horizontal alignment of Text Component content

Value

property with the following value

  • auto
  • left
  • center
  • right

Usage

const style = {
    "text-align": "center",
}

text-decoration

sets the orientation of the text characters in a line

Value

property with the following value

  • none
  • underline
  • strikethrough

Usage

const style = {
    "text-decoration": "underline",
}

Demo

test/style/text