Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. styled-text

styled-text

MITSwiftv1.4.0

A declarative text styling library for iOS with streamlined Dynamic Type support.

GitHubGitHub
232 stars4 forks0 contributors

What is styled-text?

StyledText is an iOS library that simplifies text styling by replacing attributed strings with declarative TextStyle objects. It provides drop-in replacements for UILabel, UITextView, and UIButton that automatically apply consistent styling, and includes built-in support for Apple's Dynamic Type font scaling.

Target Audience

iOS developers building apps that require consistent text styling, dynamic font scaling, or accessibility support for varying text sizes.

Value Proposition

Developers choose StyledText to eliminate verbose attributed string boilerplate, ensure consistent text styling across their app, and seamlessly integrate Dynamic Type support with minimal code.

Overview

Declarative text styles and streamlined Dynamic Type support for iOS

Use Cases

Best For

  • Simplifying text styling in iOS apps with reusable TextStyle objects
  • Implementing Dynamic Type support for accessibility font scaling
  • Replacing verbose NSAttributedString code with declarative styles
  • Creating consistent text styling across UILabel, UITextView, and UIButton
  • Building apps that need state-aware text styles for buttons
  • Reducing boilerplate when updating text in iOS interfaces

Not Ideal For

  • Projects built primarily with SwiftUI, as StyledText is UIKit-only and won't integrate seamlessly without workarounds.
  • Apps requiring complex attributed string manipulations like custom text attachments or advanced paragraph styles beyond basic font, color, and spacing.
  • Teams that prefer to avoid third-party UI dependencies to maintain full control over their codebase and minimize library updates.

Pros & Cons

Pros

Declarative Text Styles

Replaces verbose NSAttributedString code with reusable TextStyle objects, making text updates cleaner and more maintainable, as shown in the README's before/after example with StyledLabel.

Built-in Dynamic Type

Supports automatic font scaling for accessibility with configurable behaviors like scaleToStandardSizes or scaleToAllSizes, simplifying compliance with iOS accessibility guidelines without extra setup.

Drop-in UIKit Components

Provides StyledLabel, StyledTextView, and StyledButton that automatically apply text styles, reducing boilerplate and ensuring consistency across text elements in UIKit apps.

State-Aware Button Styling

StyledButton supports separate text styles for each UIControlState (normal, highlighted, disabled, selected), enabling dynamic UI responses without additional code.

Cons

Manual Dynamic Type Updates

Requires calling refreshStyle() on components when system font size changes, adding complexity and potential for missed updates, as noted in the README's need for DynamicTypeControllerDelegate.

UIKit-Only Limitation

Not compatible with SwiftUI, making it unsuitable for modern iOS projects adopting Apple's newer UI framework without cumbersome wrappers like UIViewRepresentable.

Limited Text Feature Set

Focuses on basic styling attributes (font, color, spacing) and lacks support for advanced attributed string features such as text attachments or custom underlines, which might require fallbacks to NSAttributedString.

Frequently Asked Questions

Quick Stats

Stars232
Forks4
Contributors0
Open Issues1
Last commit3 years ago
CreatedSince 2017

Tags

#ios#dynamic-type#font-scaling#accessibility#declarative-ui#text-styling#ui-components#swift#uikit

Built With

U
UIKit
i
iOS
S
Swift

Included in

iOS51.7k
Auto-fetched 3 hours ago

Related Projects

JVFloatLabeledTextFieldJVFloatLabeledTextField

UITextField subclass with floating labels - inspired by Matt D. Smith's design: http://dribbble.com/shots/1254439--GIF-Mobile-Form-Interaction?list=users

Stars7,148
Forks719
Last commit3 years ago
TextFieldEffectsTextFieldEffects

Custom UITextFields effects inspired by Codrops, built using Swift

Stars6,012
Forks591
Last commit2 years ago
SkyFloatingLabelTextFieldSkyFloatingLabelTextField

A beautiful and flexible text field control implementation of "Float Label Pattern". Written in Swift.

Stars4,127
Forks540
Last commit1 year ago
PYSearchPYSearch

🔍 An elegant search controller which replaces the UISearchController for iOS (iPhone & iPad) .

Stars3,779
Forks736
Last commit5 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub