#list #egui #ui #virtual-list

egui_virtual_list

A virtual list widget for egui, with support for variable height items

4 releases (breaking)

new 0.4.0 Jul 3, 2024
0.3.0 Apr 2, 2024
0.2.0 Feb 7, 2024
0.1.0 Jan 21, 2024

#701 in GUI

Download history 7/week @ 2024-03-13 94/week @ 2024-03-27 88/week @ 2024-04-03 9/week @ 2024-04-10 23/week @ 2024-04-24 86/week @ 2024-05-01 13/week @ 2024-05-08 89/week @ 2024-05-15 74/week @ 2024-05-22 176/week @ 2024-05-29 74/week @ 2024-06-05 58/week @ 2024-06-12 69/week @ 2024-06-19 75/week @ 2024-06-26

300 downloads per month
Used in 2 crates

MIT license

29KB
270 lines

egui_virtual_list

egui_ver Latest version Documentation unsafe forbidden License

This crate adds a virtual list widget to egui. Egui has a basic build in virtual list in the ScrollArea widget. This crate has some extra features though:

  • Supports items with varying heights
    • Heights are calculated lazily and cached, as you scroll further down the list
  • Supports custom layouts, so you could place multiple items in a single row
  • Allows for adding items at the top without the scroll position changing

There are some limitations though:

  • If you want to support a crazy amounts of items (1000000+ items), where you can instantly jump anywhere in the list, I recommend using egui's built in ScrollArea instead.
  • Horizontal scrolling is not supported yet, but it should be easy to add if needed.

If you want to build a infinite scroll list, I recommend using the egui_infinite_scroll crate instead, which is using this crate internally.

Dependencies

~5–10MB
~85K SLoC