[Media] Ratcn, the shadcn for Ratatui finally has an Input and a Textarea

67 points stengods 0 comments
[Media] Ratcn, the shadcn for Ratatui finally has an Input and a Textarea

I asked in this forum a few months ago if it was a good idea to build a "shadcn for TUI apps", that is .. a component library with sensible defaults, that supports theming, components that look good together and have good developer ergonomics. Components that you can copy into your codebase and modify if you don't like the default behaviour.

The community overwhelmingly said "DO IT!", so I did.

Now, the library have reached v0.0.6, and is looking more and more .. not complete.. but complete enough to be used to build actual apps.

Try the interactive demo! 👇 👇

ssh ratcn.com

v0.0.6 adds two long requested core components: Input and Textarea. They are both based on ratatui-textarea.

Other notable changes and additions in the last few versions:

  • Clipboard support. Copy/cut/paste from input and textarea
  • Support for pointer shapes. Pointer hand over buttons, grab hand over scroll bars, cursor in text fields, etc. Fully customizable, works with any component.
  • Components support vim motions by default: h/j/k/l, etc
  • The cargo-ratcn CLI: Usecargo ratcn init to initialize a new project. cargo ratcn add copies components from the ratcn package.
  • An interactive showcase app, served over ssh: ssh ratcn.com

There is much more to be said about ratcn but I wanted to keep this post rather short, no one likes essays. For more info and extensive documentation check out ratcn.com.

The AI disclaimer if anyone cares to know: I began working on the project doing mostly artisanal coding, perhaps 80/20 human/AI. Over time, as the size of the project has grown I have used more and more agentic support. Currently the ratio is the opposite compared to when I began, more like 80/20 AI/human. It def takes some of the joy away but brings other joys, such as the ability to release ratcn this year and not sometime next year.

Anyway, I hope you give the showcase app a try or try building something with the library. Let me know about missing components and any issues you find.

🌱