RichText

screenshot of RichText

Easily show RichText(html) in SwiftUI

Overview:

RichText is a modern and robust SwiftUI component designed to render HTML content with exceptional versatility. Engineered for use with Swift 5.9 and optimized for both iOS 15.0 and macOS 12.0, it brings powerful features that cater to a wide range of applications. The component stands out not only for its type-safe structure but also for its support of async/await patterns, which enhances performance and user experience.

With its ability to seamlessly integrate media interactions, customizable styling options, and reliable error handling, RichText makes it easy to manage complex HTML layouts. Whether for light or dark mode applications, this component provides an aesthetically pleasing rendering of content, ensuring a polished look across various platforms.

Features:

  • Async/Await Support: Utilizes modern Swift concurrency for improved performance, allowing for smoother interactions and faster load times.
  • Type Safety: Ensures robust error handling through comprehensive Swift type safety, making it easy to manage and debug code.
  • Cross-Platform Compatibility: Supports both iOS 15.0+ and macOS 12.0+, enabling consistency across devices using Swift 5.9.
  • Theme Support: Automatically adapts to light and dark modes, with options for custom color schemes to match your app’s design.
  • Responsive Layout: Features dynamic height calculations and smooth transitions, ensuring adaptability across various screen sizes and orientations.
  • Interactive Media: Provides click events for images and videos, permitting custom interactions that enhance user engagement.
  • Smart Link Management: Supports various link handling options, including Safari and customizable handlers, to provide a smooth navigation experience.
  • Advanced Styling: Offers type-safe background colors and CSS customization, giving developers complete control over the appearance of rendered HTML content.