---
title: horizontalAlignment
framework: sharedwithyou
role: symbol
role_heading: Instance Property
path: sharedwithyou/swattributionview/horizontalalignment-swift.property
---

# horizontalAlignment

The horizontal alignment of the view.

## Declaration

```swift
var horizontalAlignment: SWAttributionView.HorizontalAlignment { get set }
```

## Discussion

Discussion This horizontalAlignment specifies the horizontal anchor for the view’s contents. This value only has an effect when the width of the contents are less than the available width. You should specify a value, in case the internal default ever changes.

## See Also

### Customizing highlights

- [backgroundStyle](sharedwithyou/swattributionview/backgroundstyle-swift.property.md)
- [displayContext](sharedwithyou/swattributionview/displaycontext-swift.property.md)
- [highlight](sharedwithyou/swattributionview/highlight.md)
- [highlightMenu](sharedwithyou/swattributionview/highlightmenu.md)
- [menuTitleForHideAction](sharedwithyou/swattributionview/menutitleforhideaction.md)
- [preferredMaxLayoutWidth](sharedwithyou/swattributionview/preferredmaxlayoutwidth.md)
- [supplementalMenu](sharedwithyou/swattributionview/supplementalmenu.md)
