popout

Crates.iopopout
lib.rspopout
version0.1.1
created_at2025-06-02 11:59:08.081298+00
updated_at2025-06-05 12:40:48.473629+00
descriptionSmall and simple modal popups powered by egui
homepagehttps://github.com/0x00002a/popout
repositoryhttps://github.com/0x00002a/popout
max_upload_size
id1697886
size103,907
Natasha England-Elbro (0x00002a)

documentation

README

Popout

Small popup library

Introduction

This is a small library designed to do one thing: create modal popup windows. It was designed to be used for applications that have no persistant UI, but occasionally need to display a popup box to the user.

This crate is powered by egui and uses a custom backend built on wgpu and winit (based on this).

Examples

Check out the examples folder for more, but for a basic hello world:

use popout::{Dialog, LogicalSize};

fn main() {
    Dialog::new()
        .with_line("Hello, World")
        .with_button("Close")
        .with_size(LogicalSize::new(100, 50))
        .show()
        .unwrap();
}

This will display a dialog box to the user that contains the text "Hello, World" with a "Close" button beneath it. It is modal, so execution of main will stop on show until the window is closed.

Compatibility

This library is NOT designed to be used when you have another UI library already in use. The winit event loop can only be created ONCE and this library WILL create it on usage of any of its features. It is not intended that this library be used alongside any other UI libraries, if you have a persistant UI already then use that library's built-in popup support instead.

Commit count: 19

cargo fmt