Expand description

Web UI

webui is a website framework for building webassembly SPA websites quickly and easily. Development is just getting started, so we do not recommend using at this point for anything more than experimenting.

Re-exports

pub use crate::data_types::app_config::AppConfig;
pub use crate::data_types::direction::Direction;
pub use crate::data_types::drawer_toggle_info::DrawerToggleInfo;
pub use crate::data_types::roles;
pub use crate::data_types::theme::Theme;
pub use async_std;
pub use futures;
pub use serde;
pub use serde_json;
pub use wasm_bindgen;
pub use web_sys;
pub use yew;
pub use yew_agent;
pub use yew_hooks;
pub use crate::actors::fetch::*;
pub use crate::actors::global_data::*;
pub use crate::agents::app_state_agent::*;
pub use crate::common::classes::*;
pub use crate::common::elevation::*;
pub use crate::data_types::errors::*;
pub use crate::data_types::nav_route::*;
pub use crate::interop::*;
pub use crate::macros::titles::*;
pub use crate::macros::*;

Modules

Actors represent intermediaries for processing specific types of requests
Agents for sending and receiving messages between components.
Helpers for common settings and configurations
Components used for managing and rendering html output
Data Types
The main html module which defines components, listeners, and class helpers.
Javascript interop and related macros
Generalized macros

Macros

Macro for consolidating classes into single string
Macro for quickly logging data to the browser’s console.log
Macro for expanding string arguments into list items
Macro for expanding string arguments into paragraphs
Declares task-local values.
Macro for expanding string arguments into a title
Macro for expanding string arguments into a title
Macro for expanding string arguments into a title
Macro for expanding string arguments into a title
Macro for expanding string arguments into a title
Macro for expanding string arguments into a title
Macro for expanding string arguments into a title
Macro for expanding string arguments into a title
Macro for expanding string arguments into a title
Macro for expanding string arguments into a title
Macro for expanding string arguments into a title
Macro for expanding string arguments into a title

Structs

Link to agent’s scope for creating callbacks.
The AnimationEvent class.
Button that is used to trigger opening one of the four app drawers.
An instance of an application.
A set of classes.
The CloseEvent class.
A handle to both a closure in Rust as well as JS closure which will invoke the Rust closure.
The Component’s context. This contains component’s Scope and and props and is passed to every lifecycle method.
The context provider component.
A newtype around a bridge to indicate that it is distinct from a normal bridge
The DragEvent class.
The ErrorEvent class.
The Event class.
The FocusEvent class.
Wrapper that allows a struct implementing FunctionProvider to be consumed as a component.
Id of responses handler.
The HookUpdater provides a convenient interface for hooking into the lifecycle of the underlying Yew Component that backs the function component.
The InputEvent class.
Create an instance in the current thread.
Convenience type for use on exported fn() -> Result<T, JsError> functions, where you wish to throw a JavaScript Error object.
A Rust Future backed by a JavaScript Promise.
Representation of an object owned by JS.
The KeyboardEvent class.
State for brower’s location.
The MouseEvent class.
Navigation link component
Wrapped Node reference for later use in Component lifecycle methods.
The PointerEvent class.
Create a new instance for every bridge.
The ProgressEvent class.
Create a single instance in a tab.
The Request class.
The RequestInit dictionary.
The Response class.
The TouchEvent class.
The TransitionEvent class.
The UiEvent class.
State handle for the use_async hook.
State for an async future.
State handle for use_bridge hook
State handle for the use_clipboard hook.
State handle for the use_counter hook.
State handle for the use_debounce hook.
State handle for the use_debounce_state hook.
State handle for the use_default hook.
State handle for the use_drag hook.
Options for drag.
State handle for the use_drop hook.
Options for drop.
The PositionOptions dictionary.
State handle for the use_hash hook.
State handle for the use_latest hook.
State handle for the use_list hook.
State handle for the use_local_storage hook.
State handle for the use_map hook.
State handle for the use_media hook.
Options for media
State handle for the use_mut_latest hook.
State handle for the use_previous hook.
State handle for the use_queue hook.
State handle for the use_raf_state hook.
Dispatcher handle for use_reducer and use_reducer_eq hook
State handle for the use_set hook.
State handle for the use_state hook.
State handle for the use_state_ptr_eq hook.
Setter handle for use_state and use_state_eq hook
State handle for the use_swipe hook.
Options for swipe.
State handle for the use_throttle hook.
State handle for the use_throttle_state hook.
State handle for the use_timeout hook.
State handle for the use_toggle hook.
State handle for the use_web_socket hook.
Options for WebSocket.
The WheelEvent class.

Enums

Universal callback wrapper.
The RequestMode enum.
Swipe direction.
The current state of the WebSocket connection.

Traits

Declares the behavior of the agent.
Bridge to a specific kind of worker.
This trait allows registering or getting the address of a worker.
Components are the basic building blocks of the UI in a Yew app. Each Component chooses how to display itself using received props and self-managed state. Components can be dynamic and interactive by declaring messages that are triggered and handled asynchronously. This async update mechanism is inspired by Elm and the actor model used in the Actix framework.
This trait allows the creation of a dispatcher to an existing agent that will not send replies when messages are sent.
Trait that allows a struct to act as Function Component.
A future represents an asynchronous computation obtained by use of async.
Extension methods for Future.
A trait for checked and unchecked casting between JS types.
Trait for building properties for a component
A trait that implements a reducer function of a type.
A stream of values produced asynchronously.
Extension methods for Stream.
A trait to obtain a generic event target.
Implements rules to register a worker in a separate thread.
An extension trait for Option<T> and Result<T, E> for unwrapping the T value, or throwing a JS error if it is not available.
Read bytes asynchronously.

Functions

Render children into a DOM node that exists outside the hierarchy of the parent component.
Set, if events should bubble up the DOM tree, calling any matching callbacks.
Runs a Rust Future on the current thread.
Initializer to run in app main() to start website
This hook returns state and a run callback for an async future.
This hook returns state and a run callback for an async future with options. See use_async too.
A side-effect hook that shows browser alert when user try to reload or close the page.
This hook is a simplified use_toggle to manage boolean toggle state in a function component.
A hook to bridge to an Agent.
A hook that triggers a callback when user clicks outside the target element.
This hook is used to read from or write to clipboard for text or bytes. e.g. copy plain text or copy image/png file to clipboard.
Hook for consuming context values in function components. The context of the type passed as T is returned. If there is no such context in scope, None is returned. A component which calls use_context will re-render when the data of the context changes.
This hook is used to manage counter state in a function component.
A hook that delays invoking a function until after wait milliseconds have elapsed since the last time the debounced function was invoked.
A hook that delays calling effect callback until after wait milliseconds have elapsed since the last time effect callback was called.
This hook is similar to use_debounce_effect but it accepts dependencies.
A hook that delays updating state until after wait milliseconds have elapsed since the last time state was updated.
A state hook that returns the default value when state is None.
This hook tracks file, link and copy-paste drags.
This hook tracks file, link and copy-paste drags. use_drag hook with options.
This hook tracks file, link and copy-paste drops.
This hook tracks file, link and copy-paste drops. use_drop hook with options.
This hook is used for hooking into the component’s lifecycle.
A lifecycle hook that runs an effect only once.
This hook ignores the first invocation (e.g. on mount). The signature is exactly the same as the use_effect hook.
This hook is similar to use_effect_update but it accepts dependencies. The signature is exactly the same as the use_effect_with_deps hook.
This hook is similar to use_effect but it accepts dependencies.
A hook that subscribes a callback to events.
A hook that subscribes a callback to events only for window. If you want to specify an event target, use use_event.
A side-effect hook that sets favicon of the page.
A sensor hook that tracks user’s geographic location.
A sensor hook that tracks user’s geographic location. See use_geolocation
A sensor hook that tracks brower’s location hash value.
Low level building block of creating hooks.
A sensor hook that tracks infinite scrolling of the element.
A hook that schedules an interval to invoke callback every millis milliseconds. The interval will be cancelled if millis is set to 0.
A hook returns true if component is just mounted (on first render) and false otherwise.
A hook returns true if component is mounted and false otherwise.
This hook returns the latest immutable ref to state or props.
A hook that tracks a list and provides methods to modify it.
A side-effect hook that manages a single localStorage key.
A sensor hook that tracks brower’s location value.
This hook logs in console as component goes through life-cycles.
This hook logs in console as component goes through life-cycles. Like use_logger but only logs when prev_state != next_state. This requires the props to implement PartialEq.
A hook that tracks a hash map and provides methods to modify it.
A sensor hook that tracks an HTML element’s dimensions using the ResizeObserver API.
This hook plays video or audio and exposes its controls.
This hook plays video or audio and exposes its controls with options. see use_media
A lifecycle hook that calls a function after the component is mounted.
This hook returns the latest mutable ref to state or props.
This hook is used for obtaining a mutable reference to a stateful value. Its state persists across renders.
This hook is used for obtaining a NodeRef. It persists across renders.
This hook returns the previous immutable ref to state or props.
A hook that tracks a queue and provides methods to modify it.
An animation hook that forces component to re-render on each requestAnimationFrame, returns percentage of time elapsed. millis - milliseconds for how long to keep re-rendering component. delay — delay in milliseconds after which to start re-rendering component.
A state hook that only updates state in the callback of requestAnimationFrame.
This hook is an alternative to use_state. It is used to handle component’s state and is used when complex actions needs to be performed on said state.
use_reducer but only re-renders when prev_state != next_state.
This hook is used for obtaining a immutable reference to a stateful value. Its state persists across renders.
A hook that counts component renders.
A sensor hook that tracks an HTML element’s scroll position.
A sensor hook that tracks whether HTML element is scrolling.
A sensor hook that tracks brower’s location search param value.
A side-effect hook that manages a single sessionStorage key.
A hook that tracks a hash set and provides methods to modify it.
A sensor hook that tracks an HTML element’s dimensions using the ResizeObserver API.
This hook is used to manage state in a function component.
use_state but only re-renders when prev_state != next_state.
Similar to use_state_eq, but check if the two Rcs of values point to the same allocation, instead of PartialEq of the values.
A sensor hook that detects swipe based on TouchEvent.
A sensor hook that detects swipe based on TouchEvent with options. If you want to detect for window, pass NodeRef::default() to param node.
A sensor hook that detects swipe based on TouchEvent for window. See use_swipe.
A hook that throttles invoking a function, the function is only executed once every millis.
A hook that throttles calling effect callback, it is only called once every millis.
This hook is similar to use_throttle_effect but it accepts dependencies.
A hook that throttles updating state, the state is only updated once every millis.
A hook that schedules a timeout to invoke callback in millis milliseconds from now. The timeout will be cancelled if millis is set to 0 or cancel() is called.
A side-effect hook that sets title of the page and restore previous title when unmount.
This hook is used to manage toggle state in a function component.
A lifecycle hook that calls a function when the component will unmount.
A hook returns a function that forces component to re-render when called.
This hook communicates with WebSocket.
This hook communicates with WebSocket with options.
A sensor hook that tracks Window scroll position.
A sensor hook that tracks dimensions of the browser window.

Type Definitions

Component for displaying an icon or image
Display button
Card component
A type used for accepting children elements in Component::Properties.
A type used for accepting children elements in Component::Properties and accessing their props.
A type which expected as a result of view function implementation.
Component for displaying an image
Component for displaying a list of items
Component for display a navigation tree
Common container component
Component for displaying a blockquote

Attribute Macros

Derive Macros