---
title: firstTextBaseline
framework: swiftui
role: symbol
role_heading: Type Property
path: swiftui/verticalalignment/firsttextbaseline
---

# firstTextBaseline

A guide that marks the top-most text baseline in a view.

## Declaration

```swift
static let firstTextBaseline: VerticalAlignment
```

## Mentioned in

Aligning views within a stack Aligning views across stacks

## Discussion

Discussion Use this guide to align with the baseline of the top-most text in a view. The guide aligns with the bottom of a view that contains no text:

The following code generates the image above using an HStack: struct VerticalAlignmentFirstTextBaseline: View {     var body: some View {         HStack(alignment: .firstTextBaseline, spacing: 0) {             Color.red.frame(height: 1)             Text("First Text Baseline").font(.title).border(.gray)             Color.red.frame(height: 1)         }     } }

## See Also

### Getting guides

- [top](swiftui/verticalalignment/top.md)
- [center](swiftui/verticalalignment/center.md)
- [bottom](swiftui/verticalalignment/bottom.md)
- [lastTextBaseline](swiftui/verticalalignment/lasttextbaseline.md)
