Skip to main content
Version: Next

title

README.md

:OCTitle Composable Function

This OCTitle is a custom composable function for Jetpack Compose. It's a wrapper around the standard Text function, providing option to display the Title with highlighted parts.

:How to use OCTitle

To use the OCTitle function, simply call it within any composable:

  1. Add the necessary imports:

    import your.package.name.OCTitle

  2. Use the OCTitle within your Composable:

    @Composable
    fun MyScreen() {
    OCTitle(
    text = "Hello, <highlight>OCTitle!</highlight>",
    textColor = Color.Blue,
    fontSize = 18.sp,
    highlightColor = Color.Blue,
    // ... other configurations
    )
    }

Parameters

  • text: The text to be displayed(plain text or HTML formatted text)
  • modifier: Modifier for styling and layout.
  • textColor: Text color.
  • highlightColor: Highlighted Text color.
  • fontSize: Size of the text.
  • fontStyle: Style of the font, e.g., italic.
  • fontWeight: Weight of the font, e.g., bold.
  • fontFamily: Family of the font.
  • letterSpacing: Space between letters.
  • textDecoration: Decoration on the text, e.g., underline.
  • textAlign: Alignment of the text.
  • lineHeight: Height of each line of text.
  • overflow: How text should overflow, e.g., ellipsis.
  • softWrap: Whether the text should wrap to the next line.
  • maxLines: Maximum number of lines the text can occupy.
  • minLines: Minimum number of lines the text should occupy.
  • onTextLayout: Callback with information about text layout.
  • style: Style of the text, which can be used for combined configurations.