HtmlText

screenshot of HtmlText

A Kotlin Multiplatform library to render HTML content as Compose AnnotatedString, supporting basic formatting and hyperlinks.

Overview

HtmlText is an innovative Kotlin Multiplatform library designed to seamlessly render HTML content as Compose AnnotatedStrings. This library not only supports essential text formatting, creating hyperlinks, and applying color styles, but it also prioritizes accessibility for screen readers and keyboard navigation. It’s a versatile solution for developers creating rich text experiences in a multiplatform environment.

With the recent update to version 3.0.0-beta02, HtmlText has transitioned to a new Maven GroupId and altered its artifact naming for better clarity and organization. This reassures users that they are working with a modern library that keeps evolving to meet the demands of current tech stacks.

Features

  • Multiplatform Compatibility: HtmlText is designed to work across multiple platforms, ensuring consistent functionality regardless of where your application runs.
  • HTML Support: Supports a range of HTML tags like bold, italic, strikethrough, and underlined text, allowing for diverse textual presentations.
  • Rich Text Formatting: Easily implement unordered and ordered lists in your application, perfect for displaying structured information.
  • Clickable Links: Integrate hyperlinks effortlessly into your content, enhancing user interaction with external resources.
  • Styling Options: Offers color styling through several methods, including both hexadecimal and RGB formats for text customization.
  • Accessibility Features: HtmlText is tailored for accessibility, enabling smooth operation with screen readers and keyboard navigation, which is essential for inclusive design.
  • MaterialTheme Integration: Effortlessly map MaterialTheme colors in HtmlText, allowing for harmonious design with the rest of your application's theme.
  • Continuous Updates: The library is actively maintained, ensuring that users have access to the latest features and improvements, including enhanced performance and support.