<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSView/shadow",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSView(py)shadow"
  },
  "title" : "shadow"
}
-->

# shadow

The shadow displayed underneath the view.

```
@NSCopying var shadow: NSShadow? { get set }
```

## Return Value

An instance of `NSShadow` that is created using the <doc://com.apple.documentation/documentation/QuartzCore/CALayer/shadowColor>,<doc://com.apple.documentation/documentation/QuartzCore/CALayer/shadowOffset>, <doc://com.apple.documentation/documentation/QuartzCore/CALayer/shadowOpacity>, and <doc://com.apple.documentation/documentation/QuartzCore/CALayer/shadowRadius> properties of the view’s layer.

## Discussion

The default value of this property is normally `nil`. When you configure any of the shadow-related properties on the view’s layer, such as the <doc://com.apple.documentation/documentation/QuartzCore/CALayer/shadowColor>,<doc://com.apple.documentation/documentation/QuartzCore/CALayer/shadowOffset>, <doc://com.apple.documentation/documentation/QuartzCore/CALayer/shadowOpacity> or <doc://com.apple.documentation/documentation/QuartzCore/CALayer/shadowRadius> properties, this property contains the [`NSShadow`](/documentation/AppKit/NSShadow) object that encapsulates that information. Assigning a new shadow object to this property sets the corresponding shadow-related properties on the view’s layer.

If the view does not have a layer, setting the value of this property has no effect.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)