Skip to content

Struct ui::Modal

zaun_client::ui::Modal · Struct

pub struct Modal { … }

A modal: up to five labelled inputs and texts.

Its custom_id.

Its title.

Its labels and texts.

pub fn new<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, title: impl Into<String>) -> Self

An empty modal.

pub fn field<impl Into<String>>(self, label: impl Into<String>, input: Component) -> Self

Adds any input (radio, checkbox, file upload, …) under label.

pub fn input<impl Into<String>>(self, label: impl Into<String>, input: TextInput) -> Self

Adds a text field under label.

pub fn select<impl Into<String>>(self, label: impl Into<String>, select: Select) -> Self

Adds a select under label.

pub fn text<impl Into<String>>(self, content: impl Into<String>) -> Self

Adds markdown text.

Clone, Debug

Full rustdoc page