Skip to main content

Crate euv

Crate euv 

Source
Expand description

euv

A declarative, cross-platform UI framework for Rust with virtual DOM, reactive signals, and RSX macros for WebAssembly.

Modules§

component
event
platform
reactive
renderer
vdom

Macros§

class
The class! macro for defining CSS classes with style properties.
rsx
The rsx! macro for writing declarative UI in euv.
watch
The watch! macro for creating reactive side effects.

Structs§

AttributeEntry
Represents a single attribute on a virtual DOM node.
ComponentContext
Context provided to a component during rendering.
ComponentHandle
A handle to a mounted component instance.
CssClass
Represents a CSS class with a name and its style declarations.
DynamicNode
A closure-based dynamic node that re-renders when its dependency signals change.
HookContext
Manages hook state across render cycles for a DynamicNode.
HookContextCell
A Sync wrapper for single-threaded global HookContextInner access.
HookContextInner
Internal storage for hook state, holding boxed Any values and an index.
NativeChangeEvent
Data associated with a change event.
NativeClipboardEvent
Data associated with a clipboard event.
NativeDragEvent
Data associated with a drag event.
NativeEventHandler
A wrapper around an event callback.
NativeFocusEvent
Data associated with a focus event.
NativeInputEvent
Data associated with an input event.
NativeKeyboardEvent
Data associated with a keyboard event.
NativeMediaEvent
Data associated with a media event.
NativeMouseEvent
Data associated with a mouse event.
NativeSubmitEvent
Data associated with a form submit event.
NativeTouchEvent
Data associated with a touch event.
NativeWheelEvent
Data associated with a wheel event.
Renderer
Manages the rendering of virtual DOM nodes to the real DOM.
Signal
A reactive signal handle.
SignalInner
Inner state of a signal, holding the value and subscribed listeners.
Style
A collection of CSS style properties that can be converted to a style string.
StyleProperty
Represents a CSS style property.
TextNode
Represents a text node in the virtual DOM.

Enums§

Attribute
Represents the name of an HTML attribute or DOM property.
AttributeValue
Represents the value of an HTML attribute.
NativeEvent
Represents different kinds of UI events.
NativeEventName
Represents the name of a DOM event.
Tag
Represents the type of an HTML tag or a component.
VirtualNode
Represents a node in the virtual DOM tree.

Statics§

CURRENT_HOOK_CONTEXT
Global pointer to the currently active HookContextInner.
DEFAULT_HOOK_CONTEXT
Default empty HookContextInner for the global fallback.
HANDLER_REGISTRY
Global pointer to the handler registry.
NEXT_EUV_ID
Global auto-incrementing ID counter for DOM elements.

Traits§

AsNode
Trait for types that can be converted into a VirtualNode for use in RSX expressions.
AsReactiveText
Trait for types that can be converted into a reactive text VirtualNode.
Component
Trait defining the lifecycle of a component.
IntoCallbackAttribute
Trait for types that can be converted into a callback attribute value.
IntoEventAttribute
Trait for types that can be converted into an event attribute value.
IntoNode
Trait for converting a value into a VirtualNode by consuming it.
IntoReactiveValue
Trait for types that can be converted into a reactive string value.

Functions§

create_hook_context
Creates a new HookContext allocated via Box::leak.
get_handler_registry
Returns a mutable reference to the global handler registry.
mount
Mounts the given virtual DOM tree to a specific element matched by a CSS selector.
mount_body
Mounts the given virtual DOM tree to the document body.
trigger_update
Dispatches the global __euv_signal_update__ event on the window.
use_signal
Creates a new reactive signal with the given initial value.
with_hook_context
Runs a closure with the given HookContext set as the active context.

Type Aliases§

ComponentElement
The return type of a component function.

Attribute Macros§

component
The component attribute macro for marking component functions.