---
title: firstBaselineOffsetFromTop
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsview/firstbaselineoffsetfromtop
---

# firstBaselineOffsetFromTop

The distance (in points) between the top of the view’s alignment rectangle and its topmost baseline.

## Declaration

```swift
var firstBaselineOffsetFromTop: CGFloat { get }
```

## Discussion

Discussion The default value of this property is 0. For views that contain text or other content whose layout benefits from having a custom baseline, you can override this property and provide the correct distance between the top of the view’s alignment rectangle and the baseline of the top row of text.

## See Also

### Aligning Views with Auto Layout

- [alignmentRect(forFrame:)](appkit/nsview/alignmentrect(forframe:).md)
- [frame(forAlignmentRect:)](appkit/nsview/frame(foralignmentrect:).md)
- [alignmentRectInsets](appkit/nsview/alignmentrectinsets.md)
- [baselineOffsetFromBottom](appkit/nsview/baselineoffsetfrombottom.md)
- [lastBaselineOffsetFromBottom](appkit/nsview/lastbaselineoffsetfrombottom.md)
