# `GSComponent componentLayer`

*Instance Method*

The applicable layer of the base glyph.

## Declaration

```swift
func componentLayer() -> GSLayer?
```

```objc
- (GSLayer *) componentLayer;
```

[See also `componentLayer` in the Python API](https://docu.glyphsapp.com/#GSComponent.componentLayer)

```python
pyobjc_instanceMethods.componentLayer() -> GSLayer
```

## Discussion

An explicit master selection overrides the master associated with the containing layer. Smart component settings may produce an interpolated layer. The component transform is not applied to this layer. Returns `nil` when no applicable layer can be resolved.

## See Also

### Base Layer

- [`GSComponent.componentMasterId`](/Core/GlyphsCore/GSComponent/componentMasterId) — The ID of the base-glyph master to use.
- [`GSComponent preloadCachedLayers`](/Core/GlyphsCore/GSComponent/preloadCachedLayers) — Prepares an interpolated smart-component layer for later access.

