# `GSLayer.allComponents`

*Instance Property*

The component shapes in the layer.

## Declaration

```swift
var allComponents: [GSComponent]? { get }
```

```objc
@property (nonatomic, readonly) NSArray<GSComponent *> * allComponents;
```

```python
allComponents() -> list[GSComponent]
```

## Discussion

Returns `nil` when the layer has no component shapes.

## See Also

### Shape Proxies

- [`GSLayer.paths`](/Core/GlyphsCore/GSLayer/paths) — A proxy for iterating and accessing path shapes.
- [`GSLayer indexOfPath:`](/Core/GlyphsCore/GSLayer/indexOfPath:) — Returns the linear shape index of a path.
- [`GSLayer.components`](/Core/GlyphsCore/GSLayer/components) — A proxy for iterating and accessing component shapes.
- [`GSLayer.countOfPaths`](/Core/GlyphsCore/GSLayer/countOfPaths) — The number of path shapes in the layer.
- [`GSLayer.countOfComponents`](/Core/GlyphsCore/GSLayer/countOfComponents) — The number of component shapes in the layer.
- [`GSLayer.countOfImages`](/Core/GlyphsCore/GSLayer/countOfImages) — The number of image shapes in the layer.

