You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
HtmlText is a Kotlin Multiplatform library that allows you to render HTML content as ComposeAnnotatedStrings. It supports basic formatting, hyperlinks, and color styling in a multiplatform-friendly way.HtmlText has been made accessible for screen readers and keyboard operation.
Note
🚀 HtmlText is now Compose Multiplatform
Supported HTML tags
Tag
Description
<b>
Bold text
<i>
Italic text
<strike>
Strikethrough text
<u>
Underlined text
<ul>
Unordered list
<ol start="3" type="1">
Ordered list (a., A., 1.)
<li>
List item
<a href="...">
Clickable link
<span>
Colored text
<span>
Colored text
<font color="#FF0000">
Colored text
<font color="rgb(r,g,b)">
Colored text
MaterialTheme colors in HtmlText
To use colors likeMaterialTheme.colors.primary inHtmlText, map simple colors.
Copyright 2021 Alexander KarkossaLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
About
A Kotlin Multiplatform library to render HTML content as Compose AnnotatedString, supporting basic formatting and hyperlinks.