感谢您的访问。此页面目前仅提供英语版本。我们正在开发中文版本。谢谢您的理解。

APL Styled Properties

Styles are named entities that translate component state into visual properties. Styles are defined by APL documents and packages.

Styled properties

Property Type/Values Description Default
backgroundColor Color Color of the background transparent
borderBottomLeftRadius Dimension Radius of the bottom-left corner. Overrides borderRadius. none
borderBottomRightRadius Dimension Radius of the bottom-right corner. Overrides borderRadius. none
borderColor Color Color of the border. transparent
borderRadius Dimension Radius of the border. 0
borderTopLeftRadius Dimension Radius of the top-left corner. Overrides borderRadius. none
borderTopRightRadius Dimension Radius of the top-right corner. Overrides borderRadius. none
borderWidth Number Width of the border. 0 (no border)
color Color Color of the text. transparent
fontFamily String Font family ("Amazon Ember Display") Amazon Ember Display
fontSize Dimension The size of the text. 20
fontStyle normal, italic The font style to display normal
fontWeight normal, bold, 100, 200, 300, 400, 500, 600, 700, 800, 900 The font weight to display. normal
overlayColor Color Overlay color placed above content. transparent
scale fill, fit, best-fit, best-fit-down How an image is scaled to fit  fill
textAlign auto, left, right, center Alignment of text within a paragraph. auto
textAlignVertical auto, top, bottom, center Vertical alignment of text. Defaults to auto. auto

Map of style property to component

The styled properties appear in the following components:

Property Image Text Frame
backgroundColor x
borderBottomLeftRadius x
borderBottomRightRadius x
borderColor x
borderRadius x x
borderTopLeftRadius x
borderTopRightRadius x
borderWidth x
color x
fontFamily x
fontSize x
fontStyle x
fontWeight x
overlayColor x x
scale x
textAlign x
textAlignVertical x