2

I want to decrease the 'height' of cursor in my TextField. How do I do that?

My TextField with default cursor height looks like:

My TextField

Sparsh Dutta
  • 2,450
  • 4
  • 27
  • 54

1 Answers1

1

We can custom the text field cursor via CoreTextField.cursorBrush, with Brush.verticalGradient and colorStops argument.

BasicTextField(
    cursorBrush = Brush.verticalGradient(
        0.00f to Color.Transparent,
        0.35f to Color.Transparent,
        0.35f to Color.Green,
        0.90f to Color.Green,
        0.90f to Color.Transparent,
        1.00f to Color.Transparent
    )
)
Samnang CHEA
  • 643
  • 7
  • 10