Recommended GUI library/framework for a Markdown note-taking application?

Hi everyone,

I’m planning to build a Markdown-based note-taking application in Zig with Vim-style editing and keyboard-driven navigation.

I’m looking for recommendations on GUI libraries or frameworks that would be a good fit for this type of project. One of my main concerns is text rendering quality, as the application will spend most of its time displaying and editing text. I also need good Markdown rendering capabilities and support for modern font features.

Some features I’d eventually like to support include:

  • Markdown editing and preview
  • High-quality font and text rendering
  • Rich Markdown rendering
  • Multiple panes/views
  • File explorer/sidebar
  • Vim-style keybindings
  • Cross-platform desktop support

I would prefer a Zig-native GUI library. However, I’m also open to Zig bindings or wrappers around C/C++ libraries, as long as the Zig API is well designed and I don’t have to interact directly with @cImport or write C/C++ code myself.

I’m still exploring the Zig ecosystem, so I’d appreciate hearing about the available options, their strengths and weaknesses, and any projects that might serve as good references.

What GUI library would you recommend for a project like this, and why?

DVUI - repo is a great one that I have used. It is actively maintained and has all the widgets you would need to get started. This would be my recommendation. Fizzy is built using DVUI, so it is a proven system.

There have been a few more created recently that you can find in Ziggit. There have been a couple posts in Showcase. I can’t vouch for those as I have not personally looked into them.

Knots looks promising as well

8 Likes

I’ve been using DVUI to build a full rewrite of one of my apps into Zig and it’s been a good experience overall. In less than a week I basically re-implemented most of the frontend which was the part I was most concerned about. So I’ll be continuing to use DVUI for all of my GUI projects that use Zig, and I’m starting to implement the backend soon. I’m very excited about it.

4 Likes

It’s not the GUI part, but if you need a Markdown parser, I have one here: GitHub - JacobCrabill/zigdown: Markdown toolset in Zig ⚡ · GitHub

I have renderers for plain ANSI console output, HTML, a formatter, and Neovim. I’m also considering splitting out the core parser into its own library (separate from the CLI and renderers) to keep that dependency-free and make it easier to use in other applications.

2 Likes

Tbh it sounds like a cool idea I also have in mind for one of my projects.

However, since Markdown files are plain text, I’d think of a TUI as more natural fit than a GUI… (At least I would prefer a TUI… :smile: )

2 Likes

I was thinking about a GUI mostly because the whole project idea started when I’ve seen ZenNotes.

I liked the idea, so a note taking app using vim motion as main, but not the way it was implemented: Electron, so bloat of crap inside bundled with it.

So I tought about re-doing it in Zig as a project, if it goes on also a TUI version would’t be bad

Yes, why not. I’m simply a terminal-first guy who wants to leave my foot instance for as few applications as possible. Thus, I also wrote a simple vim-like note taking TUI for my personal usage (based on fff). However, I would like to see a more advanced approach. But thats not your wish to fulfill :wink:

1 Like

Thank you so much, I’ll look into them.

By a fast look DVUI looks really good

1 Like

That will surely be really usefull, thank you so much for sending :slight_smile:

1 Like

Really happy to hear this, both for the suggestion and for hearing a rewrite in Zig, keep it up, you are doing great

1 Like

There’s a library called Slint to which I wrote Zig bindings: https://codeberg.org/xsawyerx/slint-zig. It’s pretty slick.

1 Like

Take a look at Loris’ SuperMD library for the markdown part, it is part of Zine.

It replaces the need for HTML embedding, by using tiny scripting language (Scripty)

Replying to myself on Slint. While it’s genuinely slick, its licensing was a headache for a real project I needed to build with it and I ended up going with DVUI.

Honestly, good stuff. :smiley:

1 Like