Contents

TextShadow

The object for creating a text shadow.

Declaration

object TextShadow

Properties

NameTypeDescription
color RequiredColor

The text shadow color.

radius Requirednumber

The shadow’s radius as a value, in points, between 0 and 100.

offsetTextShadowOffset

The shadow’s offset.

opacityfloat

The opacity of the shadow as a value between 0 and 1.

Discussion

Use a TextShadow object to define a shadow that Apple News can apply to characters as part of a TextStyle.

Example

{
  "componentTextStyles": {
    "exampleStyle": {

      "textShadow": {
        "radius": 5,
        "opacity": 0.7,
        "color": "#333",
        "offset": {
          "x": -2,
          "y": 2
        }
      },
      "fontSize": 30
    }
  }
}

See Also

Text Effects