Contents

ComponentShadowOffset

The object for setting an offset value to use with a component shadow.

Declaration

object ComponentShadowOffset

Properties

NameTypeDescription
x(SupportedUnits | number)

The x offset, as a value in SupportedUnits. Implementation is device dependent.

y(SupportedUnits | number)

The y offset, as a value in SupportedUnits. Implementation is device dependent.

Discussion

Use the ComponentShadowOffset object to define an offset. A positive x value moves the shadow to the right, and a negative x value moves the shadow to the left. A positive y value moves the shadow down, and a negative y value moves the shadow up.

Example

{
  "componentStyles": {
    "exampleStyle": {
      "backgroundColor": "#FFF",
      "shadow": {
        "color": "#33333350",
        "opacity": 0.33,
        "radius": "10cw",
        "offset": {
          "x": 2,
          "y": "10cw"
        }
      }
    }
  }
}

See Also

Component Effects