Plugin.Maui.FitText 1.0.2

dotnet add package Plugin.Maui.FitText --version 1.0.2
                    
NuGet\Install-Package Plugin.Maui.FitText -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Plugin.Maui.FitText" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Plugin.Maui.FitText" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Plugin.Maui.FitText" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Plugin.Maui.FitText --version 1.0.2
                    
#r "nuget: Plugin.Maui.FitText, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Plugin.Maui.FitText@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Plugin.Maui.FitText&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Plugin.Maui.FitText&version=1.0.2
                    
Install as a Cake Tool

Plugin.Maui.FitText

image

Plugin.Maui.FitText is a .NET MAUI plugin that provides two drop-in controls — FitTextLabel and FitTextButton — whose text automatically resizes to fit the available space. It uses platform-native font scaling on iOS and Android for optimal performance and appearance.

image


Features

  • 📏 Auto-resizing Label and Button controls.
  • 🧠 Shared logic for dynamic font size calculation.
  • ⚙️ Native support for Android (AutoSizeTextType.Uniform) and iOS (AdjustsFontSizeToFitWidth).
  • ✅ Simple integration: just call .UseFitText() during startup.

Getting Started

1. Install the NuGet Package

dotnet add package Plugin.Maui.FitText

NuGet

Available on NuGet.

2. Register the Plugin in MauiProgram.cs

public static MauiApp CreateMauiApp()
{
    var builder = MauiApp.CreateBuilder()
        .UseMauiApp<App>()
        .UseFitText(); // <-- Register the FitText handlers here

    return builder.Build();
}

3. Use the Controls

<fittext:FitTextLabel Text="Hello World"
                      MinFontSize="8"
                      MaxFontSize="80"
                      HorizontalOptions="Center"
                      VerticalOptions="Center"
                      BackgroundColor="LightGray"
                      WidthRequest="200"
                      HeightRequest="50" />


<fittext:FitTextButton Text="Tap Me"
                       MinFontSize="10"
                       MaxFontSize="60"
                       BackgroundColor="SlateBlue"
                       TextColor="White"
                       WidthRequest="200"
                       HeightRequest="50" />

In your XAML, don't forget the namespace:

xmlns:fittext="clr-namespace:Plugin.Maui.FitText;assembly=Plugin.Maui.FitText"

Optional Properties

Property Type Description
MinFontSize double The smallest font size allowed when shrinking. Default: 10
MaxFontSize double The starting size and upper bound. Default: 100

Samples

A sample .NET MAUI app is included in the /samples directory, demonstrating how to use FitTextLabel and FitTextButton.


License

MIT © 2025 Ed Giardina

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-android35.0 is compatible.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-ios18.0 is compatible.  net9.0-maccatalyst was computed.  net9.0-maccatalyst18.0 is compatible.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net9.0-windows10.0.19041 is compatible.  net10.0 is compatible.  net10.0-android was computed.  net10.0-android36.0 is compatible.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-ios26.0 is compatible.  net10.0-maccatalyst was computed.  net10.0-maccatalyst26.0 is compatible.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net10.0-windows10.0.19041 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net10.0-android36.0

    • No dependencies.
  • net10.0-ios26.0

    • No dependencies.
  • net10.0-maccatalyst26.0

    • No dependencies.
  • net10.0-windows10.0.19041

  • net9.0

    • No dependencies.
  • net9.0-android35.0

    • No dependencies.
  • net9.0-ios18.0

    • No dependencies.
  • net9.0-maccatalyst18.0

    • No dependencies.
  • net9.0-windows10.0.19041

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 82 4/1/2026
1.0.1 247 5/20/2025
1.0.0 201 5/19/2025