# `GSLayer alignComponents`

*Instance Method*

Aligns components according to their alignment settings.

## Declaration

```swift
func alignComponents()
```

```objc
- (void) alignComponents;
```

```python
alignComponents()
```

## Discussion

This updates component positions and layer width where automatic alignment applies.

## See Also

### Component Alignment

- [`GSLayer alignComponents:`](/Core/GlyphsCore/GSLayer/alignComponents:) — Aligns components according to their alignment settings.
- [`GSLayer doAlignComponents`](/Core/GlyphsCore/GSLayer/doAlignComponents) — Performs component alignment immediately.
- [`GSLayer needsAlignment`](/Core/GlyphsCore/GSLayer/needsAlignment) — Whether component alignment needs to be updated.
- [`GSLayer getPositionsFromLayer:`](/Core/GlyphsCore/GSLayer/getPositionsFromLayer:) — Copies shape positions and related hint positions from another layer.

