dear-file-browser
File dialogs and in-UI file browser for dear-imgui-rs with two backends:
- Native (
rfd): OS dialogs on desktop, Web File Picker on WASM - ImGui UI: a pure Dear ImGui file browser/widget (configurable layout + UX)

Links
- Native backend: https://github.com/PolyMeilex/rfd
- In-UI: Pure Dear ImGui implementation (no C API)
Compatibility
| Item | Version |
|---|---|
| Crate | 0.5.x |
| dear-imgui-rs | 0.5.x |
Features
- Backends:
Backend::Auto|Native|ImGuiwith runtime selection - Modes:
OpenFile,OpenFiles,PickFolder,SaveFile - Native (rfd): blocking and async APIs (desktop); Web File Picker on WASM
- ImGui (pure UI):
- Layouts:
Standard(quick locations + list) orMinimal - Filters by extension, substring Search, directories-first (configurable)
- Sorting by Name/Size/Modified via table headers
- Breadcrumbs with automatic compression on long paths
- Click behavior for directories:
SelectorNavigate - Double-click to navigate/confirm (configurable)
- Keyboard shortcuts: Enter, Backspace, Ctrl+L (path), Ctrl+F (search)
- Empty-state hint with configurable color/message
- CJK/emoji supported via user-provided fonts
- Layouts:
- Unified
Selection+FileDialogErroracross backends - Optional
tracinginstrumentation
Features (Cargo)
imgui(default): enable the in-UI file browsernative-rfd(default): enable native dialogs viarfdtracing(default): enable internal tracing spans
Default enables both backends; at runtime Backend::Auto prefers native and
falls back to ImGui if not available.
Quick Start
use ;
// Native async dialog (desktop/wasm):
#
let selection = block_on;
// ImGui-embedded browser (non-blocking):
# use *;
# let mut ctx = create;
# let ui = ctx.frame;
use ;
let mut state = new;
// Optional configuration
state.layout = Standard; // or Minimal
state.click_action = Select; // or Navigate
state.double_click = true;
state.dirs_first = true;
state.breadcrumbs_max_segments = 6;
state.empty_hint_enabled = true;
state.empty_hint_color = ;
ui.window
.size
.build;
Fonts (CJK/Emoji)
Dear ImGui’s default font does not contain CJK glyphs or emoji. If your file
system includes non-ASCII names (e.g., Chinese), load a font with the required
glyphs into the font atlas during initialization. See examples/style_and_fonts.rs
in this repository for a complete pattern. Enabling the freetype feature in
dear-imgui-rs also improves text quality.
WASM
- Native:
rfduses the browser file picker and is the recommended way to access user files. - ImGui: the pure UI browser relies on
std::fsto enumerate directories. In the browser this cannot access the OS filesystem, so the view will be empty. Prefer the nativerfdbackend on wasm.
Fonts (CJK/Emoji)
Dear ImGui’s default font does not include CJK glyphs or emoji. If your filesystem contains non‑ASCII names (e.g., Chinese), load a font with the required glyphs into the atlas during initialization. See examples/style_and_fonts.rs for a complete pattern. Enabling the freetype feature in dear-imgui-rs also improves text quality.
License
MIT OR Apache-2.0