#251·ink

Add cursor support

Author: rickbuttonCreated Dec 16, 2019Updated May 15, 2026
Labelsenhancement

Hi!

First, ink is an amazing awesome project and I'm so glad it exists.

Have you considered support for mutating the cursor position? I'm working on the repl for rickbutton/turbo and need a way to represent the actual cursor.

Ideally, the cursor could exist as a special component, that when drawn on the screen moves the cursor to its actual position in the output. As a usage suggestion, does this make sense?

javascript
import { Cursor } from "ink";
function Component(props) {
    return <span>Some text <Cursor/> </span>;
}

I would love to contribute an implementation of this if you think this is acceptable.