Available on crate feature
prelude only.Re-exports§
pub use dioxus_core;pub use dioxus_core::SuspenseBoundary;pub use dioxus_html as dioxus_elements;pub use dioxus_html::keyboard_types;pub use manganis;pub use dioxus_signals;pub use dioxus_stores;pub use dioxus_document as document;
Modules§
- global_
attributes - svg_
attributes - warnings
- Warnings that can be triggered by suspicious usage of signals
Macros§
- asset
- The asset macro collects assets that will be included in the final binary
- default_
impl - This macro is used to generate a
impl Defaultblock for any type with the function new_maybe_sync that takes a genericT - eq_
impls - This macro is used to generate
impl PartialEqblocks for any Readable type that takes a genericT - fmt_
impls - This macro is used to generate
impl Display, andimpl Debugblocks for any Readable type that takes a genericT - option_
asset - Resolve an asset at compile time, returning
Noneif the asset does not exist. - read_
impls - This macro is used to generate
impl Display,impl Debug,impl PartialEq, andimpl Eqblocks for any Readable type that takes a genericT - rsx
- The rsx! macro makes it easy for developers to write jsx-style markup in their components.
- to_
owned - A helper macro for cloning multiple values at once
- use_
reactive - A helper macro for
use_reactivethat merges uses the closure syntax to elaborate the dependency array - write_
impls - This macro is used to generate
impl Add,impl AddAssign,impl Sub,impl SubAssign,impl Mul,impl MulAssign,impl Div, andimpl DivAssignblocks for any Writable type that takes a genericT
Structs§
- Action
- Animation
Data - Asset
- A bundled asset with some options. The asset can be used in rsx! to reference the asset.
It should not be read directly with
std::fs::readbecause the path needs to be resolved relative to the bundle - Asset
Options - Settings for a generic asset
- Attribute
- An attribute on a DOM node, such as
id="my-thing"orhref="https://example.com" - Bundled
Asset - An asset that should be copied by the bundler with some options. This type will be
serialized into the binary.
CLIs that support manganis, should pull out the assets from the link section, optimize,
and write them to the filesystem at
BundledAsset::bundled_pathfor the application to use. - Callback
- The callback type generated by the
rsx!macro when anonfield is specified for components. - Cancel
Data - Clipboard
Data - Composition
Data - Copy
Value - CopyValue is a wrapper around a value to make the value mutable and Copy.
- Coroutine
- CssAsset
Options - Options for a css asset
- Dispatching
- Drag
Data - The DragEvent interface is a DOM event that represents a drag and drop interaction. The user initiates a drag by placing a pointer device (such as a mouse) on the touch surface and then dragging the pointer to a new location (such as another DOM element). Applications are free to interpret a drag and drop interaction in an application-specific way.
- Effect
- A handle to an effect.
- Error
Context - A context with information about suspended components
- Event
- A wrapper around some generic data that handles the event’s state
- Focus
Data - Folder
Asset Options - The builder for a folder asset.
- Form
Data - Global
- A lazy value that is created once per application and can be accessed from anywhere in that application
- Global
Lazy Context - The context for global signals
- Image
Asset Options - Options for an image asset
- Image
Data - JsAsset
Options - Options for a javascript asset
- Keyboard
Data - Mapped
MutSignal - A read only signal that has been mapped to a new type.
- Mapped
Signal - A read only signal that has been mapped to a new type.
- Media
Data - Memo
- Memos are the result of computing a value from
use_memo. - Modifiers
- Pressed modifier keys.
- Mounted
Data - An Element that has been rendered and allows reading and modifying information about it.
- Mouse
Data - A synthetic event that wraps a web-style
MouseEventData associated with a mouse event - Owner
- Owner: Handles dropping generational boxes. The owner acts like a runtime lifetime guard. Any states that you create with an owner will be dropped when that owner is dropped.
- Platform
Event Data - A platform specific event.
- Pointer
Data - Read
Signal - A boxed version of Readable that can be used to store any readable type.
- Readable
Value Iterator - An iterator over the values of a
Readable<Vec<T>>. - Resize
Data - Resource
- A handle to a reactive future spawned with
use_resourcethat can be used to modify or read the result of the future. - ScopeId
- A component’s unique identifier.
- Scroll
Data - Scroll
ToOptions - The way that scrolling should be performed
- Selection
Data - SetCompare
- An object that can efficiently compare a value to a set of values.
- Signal
- Signals are a Copy state management solution with automatic dependency tracking.
- Signal
Data - The data stored for tracking in a signal.
- Store
- Stores are a reactive type built for nested data structures. Each store will lazily create signals for each field/member of the data structure as needed.
- Suspense
Context - A context with information about suspended components
- Sync
Storage - A thread safe storage. This is slower than the unsync storage, but allows you to share the value between threads.
- Toggle
Data - Touch
Data - Touch
Point - Transition
Data - Unbounded
Receiver - The receiving end of an unbounded mpsc channel.
- Unbounded
Sender - The transmission end of an unbounded mpsc channel.
- Unsync
Storage - A unsync storage. This is the default storage type.
- UseFuture
- UseWaker
- VNode
- A reference to a template along with any context needed to hydrate it
- Virtual
Dom - A virtual node system that progresses user events and diffs UI trees.
- Visible
Data - Wheel
Data - Data associated with a WheelEvent
- Writable
Value Iterator - An iterator over the values of a
Writable<Vec<T>>. - Write
Lock - A mutable reference to a writable value. This reference acts similarly to
std::cell::RefMut, but it has extra debug information and integrates with the reactive system to automatically update dependents. - Write
Signal - A boxed version of Writable that can be used to store any writable type.
Enums§
- Asset
Variant - Settings for a specific type of asset
- Borrow
Error - An error that can occur when trying to borrow a value.
- Borrow
MutError - An error that can occur when trying to borrow a value mutably.
- Code
- Code is the physical position of a key.
- Form
Value - A value in a form, either text or a file
- Global
Key - A key used to identify a signal in the global signal context
- Image
Format - The type of an image. You can read more about the tradeoffs between image formats here
- Image
Size - The size of an image asset
- Key
- Key represents the meaning of a keypress.
- KeyCode
- Location
- The location attribute contains an indication of the logical location of the key on the device.
- Mounted
Error - The error type for the MountedData
- Render
Error - An error that can occur while rendering a component
- Resize
Error - The error type for the MountedData
- Scroll
Behavior - The way that scrolling should be performed
- Scroll
Logical Position - The desired final position within the scrollable ancestor container for a given axis.
- UseFuture
State - A signal that represents the state of a future
- UseResource
State - A signal that represents the state of the resource
- Visible
Error - The error type for the VisibleData
Traits§
- AExtension
- Abbr
Extension - Action
Callback - Address
Extension - Animate
Extension - Animate
Motion Extension - Animate
Transform Extension - Annotation
Extension - Annotation
XmlExtension - AnyStorage
- A trait for any storage backing type.
- Anyhow
Context - Provides the
contextmethod forResult. - Area
Extension - Article
Extension - Aside
Extension - Audio
Extension - BExtension
- Base
Extension - BdiExtension
- BdoExtension
- Blockquote
Extension - Body
Extension - Boxed
Signal Storage - A trait for creating boxed readable and writable signals. This is implemented for UnsyncStorage and SyncStorage.
- BrExtension
- Button
Extension - Canvas
Extension - Caption
Extension - Circle
Extension - Cite
Extension - Clip
Path Extension - Code
Extension - ColExtension
- Colgroup
Extension - Create
Boxed Signal Storage - A trait for creating boxed readable and writable signals. This is implemented for UnsyncStorage and SyncStorage.
- Data
Extension - Datalist
Extension - DdExtension
- Defs
Extension - DelExtension
- Dependency
- A dependency is a trait that can be used to determine if a effect or selector should be re-run.
- Dependency
Element - A dependency is a trait that can be used to determine if a effect or selector should be re-run.
- Desc
Extension - Details
Extension - DfnExtension
- Dialog
Extension - Discard
Extension - DivExtension
- DlExtension
- DtExtension
- Ellipse
Extension - EmExtension
- Embed
Extension - FeBlend
Extension - FeColor
Matrix Extension - FeComponent
Transfer Extension - FeComposite
Extension - FeConvolve
Matrix Extension - FeDiffuse
Lighting Extension - FeDisplacement
MapExtension - FeDistant
Light Extension - FeDrop
Shadow Extension - FeFlood
Extension - FeFuncA
Extension - FeFuncB
Extension - FeFuncG
Extension - FeFuncR
Extension - FeGaussian
Blur Extension - FeImage
Extension - FeMerge
Extension - FeMerge
Node Extension - FeMorphology
Extension - FeOffset
Extension - FePoint
Light Extension - FeSpecular
Lighting Extension - FeSpot
Light Extension - FeTile
Extension - FeTurbulence
Extension - Fieldset
Extension - Figcaption
Extension - Figure
Extension - Filter
Extension - Footer
Extension - Foreign
Object Extension - Form
Extension - GExtension
- Global
Attributes Extension - H1Extension
- H2Extension
- H3Extension
- H4Extension
- H5Extension
- H6Extension
- HasAnimation
Data - A trait for any object that has the data for an animation event
- HasAttributes
- A trait for anything that has a dynamic list of attributes
- HasCancel
Data - HasClipboard
Data - HasComposition
Data - A trait for any object that has the data for a composition event
- HasDrag
Data - A trait for any object that has the data for a drag event
- HasFocus
Data - HasForm
Data - An object that has all the data for a form event
- HasImage
Data - A trait for any object that has the data for an image event
- HasKeyboard
Data - HasMedia
Data - HasMouse
Data - A trait for any object that has the data for a mouse event
- HasPointer
Data - A trait for any object that has the data for a pointer event
- HasResize
Data - HasScroll
Data - HasSelection
Data - HasToggle
Data - HasTouch
Data - HasTouch
Point Data - A trait for touch point data
- HasTransition
Data - HasVisible
Data - HasWheel
Data - Hatch
Extension - Hatchpath
Extension - Head
Extension - Header
Extension - Hgroup
Extension - History
- HrExtension
- Html
Event Converter - A converter between a platform specific event and a general event. All code in a renderer that has a large binary size should be placed in this trait. Each of these functions should be snipped in high levels of optimization.
- IExtension
- Iframe
Extension - Image
Extension - ImgExtension
- Initialize
From Function - A trait for an item that can be constructed from an initialization function
- Input
Extension - InsExtension
- Interaction
Element Offset - A interaction that contains data about the location of the event.
- Interaction
Location - A interaction that contains data about the location of the event.
- Into
DynNode - A trait that allows various items to be converted into a dynamic node for the rsx macro
- KbdExtension
- Label
Extension - Legend
Extension - LiExtension
- Line
Extension - Linear
Gradient Extension - Link
Extension - Main
Extension - MapExtension
- Mark
Extension - Marker
Extension - Mask
Extension - Math
Extension - Menu
Extension - Merror
Extension - Meta
Extension - Metadata
Extension - Meter
Extension - Mfrac
Extension - MiExtension
- Mmultiscripts
Extension - MnExtension
- MoExtension
- Modifiers
Interaction - A interaction that contains data about the current state of the keyboard modifiers.
- Mover
Extension - Mpadded
Extension - Mpath
Extension - Mphantom
Extension - Mprescripts
Extension - Mroot
Extension - Mrow
Extension - MsExtension
- Mspace
Extension - Msqrt
Extension - Mstyle
Extension - Msub
Extension - Msubsup
Extension - Msup
Extension - Mtable
Extension - MtdExtension
- Mtext
Extension - MtrExtension
- Munder
Extension - Munderover
Extension - NavExtension
- Noscript
Extension - Object
Extension - OlExtension
- Optgroup
Extension - Option
Extension - Output
Extension - PExtension
- Param
Extension - Path
Extension - Pattern
Extension - Picture
Extension - Pointer
Interaction - A interaction that contains data about the pointer button(s) that triggered the event.
- Polygon
Extension - Polyline
Extension - PreExtension
- Progress
Extension - QExtension
- Radial
Gradient Extension - Readable
- A trait for states that can be read from like
crate::Signal,crate::GlobalSignal, orcrate::ReadSignal. You may choose to accept this trait as a parameter instead of the concrete type to allow for more flexibility in your API. For example, instead of creating two functions, one that accepts acrate::Signaland one that accepts acrate::GlobalSignal, you can create one function that accepts aReadabletype. - Readable
BoxExt - An extension trait for
Readabletypes that can be boxed into a trait object. - Readable
Ext - An extension trait for
Readabletypes that provides some convenience methods. - Readable
Hash MapExt - An extension trait for
Readable<HashMap<K, V, H>>that provides some convenience methods. - Readable
Hash SetExt - An extension trait for
Readable<HashSet<V, H>>that provides some convenience methods. - Readable
Option Ext - An extension trait for
Readable<Option<T>>that provides some convenience methods. - Readable
Result Ext - An extension trait for
Readable<Option<T>>that provides some convenience methods. - Readable
StrExt - An extension trait for
Readable<String>andReadable<str>that provides some convenience methods. - Readable
String Ext - An extension trait for
Readable<String>that provides some convenience methods. - Readable
VecExt - An extension trait for
Readable<Vec<T>>that provides some convenience methods. - Rect
Extension - Rendered
Element Backing - An Element that has been rendered and allows reading and modifying information about it.
- RpExtension
- RtExtension
- Ruby
Extension - SExtension
- Samp
Extension - Script
Extension - Section
Extension - Select
Extension - Semantics
Extension - SetExtension
- Slot
Extension - Small
Extension - Source
Extension - Span
Extension - Stop
Extension - Storage
- A trait for a storage backing type. (RefCell, RwLock, etc.)
- Strong
Extension - Style
Extension - SubExtension
- Summary
Extension - SupExtension
- SvgAttributes
Extension - SvgExtension
- Switch
Extension - Symbol
Extension - Table
Extension - Tbody
Extension - TdExtension
- Template
Extension - Text
Extension - Text
Path Extension - Textarea
Extension - Tfoot
Extension - ThExtension
- Thead
Extension - Time
Extension - Title
Extension - TrExtension
- Track
Extension - Tspan
Extension - UExtension
- UlExtension
- UseExtension
- VarExtension
- Video
Extension - View
Extension - WbrExtension
- Writable
- A trait for states that can be written to like
crate::Signal. You may choose to accept this trait as a parameter instead of the concrete type to allow for more flexibility in your API. - Writable
Boxed Ext - An extension trait for
Writablevalues that can be boxed into a trait object. - Writable
Ext - An extension trait for
Writablethat provides some convenience methods. - Writable
Hash MapExt - An extension trait for
Writable<HashMap<K, V, H>>that provides some convenience methods. - Writable
Hash SetExt - An extension trait for
Writable<HashSet<V, H>>that provides some convenience methods. - Writable
Option Ext - An extension trait for
Writable<Option<T>>` that provides some convenience methods. - Writable
String Ext - An extension trait for
Writable<String>that provides some convenience methods. - Writable
VecExt - An extension trait for
Writable<Vec<T>>that provides some convenience methods.
Functions§
- Error
Boundary - Create a new error boundary component that catches any errors thrown from child components
- Fragment
- Create inline fragments using Component syntax.
- Meta
- Render a
<meta>tag into the head of the page. - Stylesheet
- Render a
<link>tag into the head of the page with the stylesheet rel. This is equivalent to theLinkcomponent with a slightly more ergonomic API. - Suspense
Boundary - Suspense Boundaries let you render a fallback UI while a child component is suspended.
- Title
- Render the title of the page. On web renderers, this will set the
<title>in the head. On desktop, it will set the window title. - consume_
context - Consume context from the current scope
- get_
global_ context - Get the global context for signals
- history
- Get the history provider for the current platform if the platform doesn’t implement a history functionality.
- onabort
- abort
- onanimationend
- onanimationend
- onanimationiteration
- onanimationiteration
- onanimationstart
- onanimationstart
- onauxclick
- auxclick
- onbeforetoggle
- onbeforetoggle
- onblur
- onblur
- oncancel
- oncancel
- oncanplay
- canplay
- oncanplaythrough
- canplaythrough
- onchange
- onchange
- onclick
- Execute a callback when a button is clicked.
- oncompositionend
- oncompositionend
- oncompositionstart
- oncompositionstart
- oncompositionupdate
- oncompositionupdate
- oncontextmenu
- oncontextmenu
- oncopy
- oncopy
- oncut
- oncut
- ondblclick
Deprecated General Event Handler Information
- ondoubleclick
General Event Handler Information
- ondrag
- ondrag
- ondragend
- ondragend
- ondragenter
- ondragenter
- ondragexit
- ondragexit
- ondragleave
- ondragleave
- ondragover
- ondragover
- ondragstart
- ondragstart
- ondrop
- ondrop
- ondurationchange
- durationchange
- onemptied
- emptied
- onencrypted
- encrypted
- onended
- ended
- onerror
- onerror
- onfocus
- onfocus
- onfocusin
General Event Handler Information
- onfocusout
General Event Handler Information
- ongotpointercapture
- gotpointercapture
- oninput
- The
oninputevent is fired when the value of a<input>,<select>, or<textarea>element is changed. - oninvalid
- oninvalid
- onkeydown
- onkeydown
- onkeypress
- onkeypress
- onkeyup
- onkeyup
- onload
- onload
- onloadeddata
- loadeddata
- onloadedmetadata
- loadedmetadata
- onloadstart
- loadstart
- onlostpointercapture
- lostpointercapture
- onmount
- The onmounted event is fired when the element is first added to the DOM. This event gives you a
MountedDataobject and lets you interact with the raw DOM element. - onmounted
- The onmounted event is fired when the element is first added to the DOM. This event gives you a
MountedDataobject and lets you interact with the raw DOM element. - onmousedown
- onmousedown
- onmouseenter
- onmouseenter
- onmouseleave
- onmouseleave
- onmousemove
- onmousemove
- onmouseout
- onmouseout
- onmouseover
- onmouseover
- onmouseup
- onmouseup
- onpaste
- onpaste
- onpause
- pause
- onplay
- play
- onplaying
- playing
- onpointercancel
- pointercancel
- onpointerdown
- pointerdown
- onpointerenter
- pointerenter
- onpointerleave
- pointerleave
- onpointermove
- pointermove
- onpointerout
- pointerout
- onpointerover
- pointerover
- onpointerup
- pointerup
- onprogress
- progress
- onratechange
- ratechange
- onreset
- onreset
- onresize
- onresize
- onscroll
- onscroll
- onscrollend
- onscrollend
- onseeked
- seeked
- onseeking
- seeking
- onselect
- select
- onselectionchange
- selectionchange
- onselectstart
- selectstart
- onstalled
- stalled
- onsubmit
- onsubmit
- onsuspend
- suspend
- ontimeupdate
- timeupdate
- ontoggle
- ontoggle
- ontouchcancel
- touchcancel
- ontouchend
- touchend
- ontouchmove
- touchmove
- ontouchstart
- touchstart
- ontransitionend
- transitionend
- onvisible
- onvisible
- onvolumechange
- volumechange
- onwaiting
- waiting
- onwheel
- Called when the mouse wheel is rotated over an element.
- provide_
context - Provide context to the current scope
- set_
event_ converter - spawn
- Spawns the future and returns the
Task. This task will automatically be canceled when the component is dropped. - suspend
- Suspended the current component on a specific task and then return None
- try_
consume_ context - Consume context from the current scope
- try_
use_ context - Consume some context in the tree, providing a sharable handle to the value
- use_
action - use_
after_ suspense_ resolved - Run a closure after the suspense boundary this is under is resolved. The closure will be run immediately if the suspense boundary is already resolved or the scope is not under a suspense boundary.
- use_
callback - Create a callback that’s always up to date. Whenever this hook is called the inner callback will be replaced with the new callback but the handle will remain.
- use_
context - Consume some context in the tree, providing a sharable handle to the value
- use_
context_ provider - Provide some context via the tree and return a reference to it
- use_
coroutine - Maintain a handle over a future that can be paused, resumed, and canceled.
- use_
coroutine_ handle - Get a handle to a coroutine higher in the tree
Analogous to use_context_provider and use_context,
but used for coroutines specifically
See the docs for
use_coroutinefor more details. - use_
drop - Creates a callback that will be run before the component is removed.
This can be used to clean up side effects from the component
(created with
use_effect). - use_
effect - Effects are reactive closures that run after the component has finished rendering. Effects are useful for things like manually updating the DOM after it is rendered with web-sys or javascript. Or reading a value from the rendered DOM.
- use_
future - A hook that allows you to spawn a future the first time you render a component.
- use_
hook - Store a value between renders. The foundational hook for all other hooks.
- use_
hook_ did_ run - A utility lifecycle hook that is intended to be used inside other hooks to determine if the outer hook has ran this render. The provided callback is executed after each render. The value will only be true if the containing outer hook is executed.
- use_
memo - Creates a new Memo. The memo will be run immediately and whenever any signal it reads is written to. Memos can be used to efficiently compute derived data from signals.
- use_
on_ unmount Deprecated - use_
reactive - Takes some non-reactive data, and a closure and returns a closure that will subscribe to that non-reactive data as if it were reactive.
- use_
resource use_resource()is a reactive hook that resolves to the result of a future. It will rerun when you write to any signals you read inside the future.- use_
root_ context - Try to get a value from the root of the virtual dom, if it doesn’t exist, create a new one with the closure provided.
- use_
set_ compare - Creates a new SetCompare which efficiently tracks when a value changes to check if it is equal to a set of values.
- use_
set_ compare_ equal - A hook that returns true if the value is equal to the value in the set compare.
- use_
signal - Creates a new Signal. Signals are a Copy state management solution with automatic dependency tracking.
- use_
signal_ sync - Creates a new `Send + Sync`` Signal. Signals are a Copy state management solution with automatic dependency tracking.
- use_
store - Create a new
Store. Stores are a reactive type built for nested data structures. - use_
waker - A hook that provides a waker for other hooks to provide async/await capabilities.
Type Aliases§
- Animation
Event - Cancel
Event - Clipboard
Event - Component
- A
Componentis a function that takesPropertiesand returns anElement. - Composition
Event - Drag
Event - Element
- An
Elementis a possibly-noneVNodecreated by callingrenderonScopeIdorScopeState. - Event
Handler - The callback type generated by the
rsx!macro when anonfield is specified for components. - Focus
Event - Form
Event - Global
Memo - A memo that can be accessed from anywhere in the application and created in a static
- Global
Signal - A signal that can be accessed from anywhere in the application and created in a static
- Global
Store - A type alias for global stores
- Image
Event - Keyboard
Event - Media
Event - Mounted
Event - Mounted
Result - The MountedResult type for the MountedData
- Mouse
Event - Pointer
Event - A synthetic event that wraps a web-style
PointerEvent - Read
Only Signal Deprecated - A signal that can only be read from.
- Read
Store - A type alias for a boxed read-only store.
- Readable
Ref - A reference to a value that can be read from.
- Resize
Event - Resize
Result - The ResizeResult type for the ResizeData
- Scroll
Event - Selection
Event - Sync
Signal - A signal that can safely shared between threads.
- Toggle
Event - Touch
Event - Transition
Event - Visible
Event - Visible
Result - The VisibleResult type for the VisibleData
- Wheel
Event - A synthetic event that wraps a web-style
WheelEvent - Writable
Ref - A reference to a value that can be written to.
- Write
Store - A type alias for a boxed writable-only store.
Attribute Macros§
- component
- Component
- css_
module - Generate type-safe styles with scoped CSS class names.
- store
#[store]