minimumScaleFactor
Sets the minimum amount that text in this view scales down to fit in the available space.
minimumScaleFactor(factor)
| Parameter | Type | Description |
|---|---|---|
factor | number | A fraction between 0 and 1 (including 0 and 1) that specifies the amount of text to draw. For example, a value of 0.5 draws the text in a font size as small as half the actual font if needed. |
Sets the minimum amount that text in this view scales down to fit in the available space.
Use this modifier if the text you place in a view doesn't fit and it's okay if the text shrinks to accommodate. For example, a label with a minimum scale factor of 0.5 draws its text in a font size as small as half of the actual font if needed.
Returns: ModifierConfig
See: Official SwiftUI documentation.
Works with
This modifier works with any view. These components accept it:
- VStack
- HStack
- ZStack
- LazyVStack
- LazyHStack
- Group
- Spacer
- Divider
- Overlay
- ScrollView
- Button
- Toggle
- Checkbox
- Slider
- Picker
- DatePicker
- ColorPicker
- Link
- ControlGroup
- Menu
- ContextMenu
- TextField
- SecureField
- Text
- Label
- Image
- List
- Form
- Section
- DisclosureGroup
- SwipeActions
- BottomSheet
- Alert
- ConfirmationDialog
- Popover
- ProgressView
- Gauge
- TabView
- AccessoryWidgetBackground
Sources
The original Expo docs for this page:
- minimumScaleFactor (Modifiers) (
source-of-truth/versions/v57.0.0/sdk/ui/swift-ui/modifiers.md)
menuOrder
Sets the preferred order of items for menus presented from this view. With the default automatic order, a menu that opens upward displays its items in reverse. Pass fixed to always keep the order the items were provided in.
monospacedDigit
Modifies the fonts of all child views to use fixed-width digits, if possible, while leaving other characters proportionally spaced. When applied to Text, modifies the text view's font to use fixed-width digits, while leaving other characters proportionally spaced.