Expand description
Useful imports.
Re-exports
Modules
- Tracked and computed state in Dioxus
Macros
- Alias for
Cow::Borrowed, because that’s used a million times so shortening it is nice. Makes the code more readable. - Example usage:
- Start the hot reloading server with the current directory as the root
- The render! macro makes it easy for developers to write jsx-style markup in their components.
- The rsx! macro makes it easy for developers to write jsx-style markup in their components.
- Create
FooThemeWithstructs without having to deal with the verbose syntax. - A helper macro for using hooks and properties in async environments.
- This macro has three arguments separator by commas.
- A helper macro that merges uses the closure syntax to elaborate the dependency array
Structs
AccordionBodycomponent properties.Accordioncomponent properties.AccordionSummarycomponent properties.- Theming properties for the
Accordioncomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Manage the lifecyle of an Animation.
- Theming properties for the
ArrowIconcomponent. - You can use this to change a theme for only one component, with the
themeproperty. Bodycomponent properties.- Theming properties for the
Bodycomponent. - You can use this to change a theme for only one component, with the
themeproperty. - An error returned by [
RefCell::try_borrow]. - An error returned by [
RefCell::try_borrow_mut]. Buttoncomponent properties.- Theming properties for the
Buttoncomponent. - You can use this to change a theme for only one component, with the
themeproperty. Canvascomponent properties.- Theming properties for the
Canvascomponent. - You can use this to change a theme for only one component, with the
themeproperty. CursorAreacomponent properties.DragProvidercomponent properties.DragZonecomponent properties.DropZonecomponent properties.DropdownItemcomponent properties.- Theming properties for the
DropdownItemcomponent. - You can use this to change a theme for only one component, with the
themeproperty. Dropdowncomponent properties.- Theming properties for the
Dropdowncomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Create a configuration for a
UseEditable. - A wrapper around some generic data that handles the event’s state
- The callback type generated by the
rsx!macro when anonfield is specified for components. ExternalLinkcomponent properties.- Theming properties for the
ExternalLinkcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Theming properties for Fonts.
- You can use this to change a theme for only one component, with the
themeproperty. Theming properties for Fonts. GestureAreacomponent properties.- Data line for the
Graphcomponent. Graphcomponent properties.- Theming properties for the
Graphcomponent. - You can use this to change a theme for only one component, with the
themeproperty. Inputcomponent properties.- Theming properties for the
Inputcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Data of a Keyboard event.
- Launch configuration.
- Configuration Builder.
- A concrete type provider for closures that build
VNodestructures. - A text line from a TextEditor
- Iterator over text lines.
Loadercomponent properties.- Theming properties for the
Loadercomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Data of a Mouse event.
NetworkImagecomponent properties.- Theming properties for the
NetworkImagecomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Node layout configuration
- Cached layout results of a Node
- Data of a Mouse event.
ProgressBarcomponent properties.- Theming properties for the
ProgressBarcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - A 2d Rectangle optionally tagged with a unit.
- Wraps a borrowed reference to a value in a
RefCellbox. A wrapper type for an immutably borrowed value from aRefCell<T>. - A clone of the standard library’s
RefCelltype. - A wrapper type for a mutably borrowed value from a
RefCell<T>. - A utf8 text rope.
- TextEditor implementing a Rope
- A global runtime that is shared across all scopes that provides the async runtime and context API
- A gaurd for a new runtime. This must be used to override the current runtime when importing components from a dynamic library that has it’s own runtime.
- A component’s unique identifier.
- A component’s state separate from its props.
- A wrapper around a component’s
ScopeStateand properties. TheScopeStateprovides the majority of methods for the VirtualDom and component state. - Theming properties for the
ScrollBarcomponent. - You can use this to change a theme for only one component, with the
themeproperty. ScrollViewcomponent properties.- Theming properties for the
ScrollViewcomponent. Also used byVirtualScrollView. - You can use this to change a theme for only one component, with the
themeproperty. Also used byVirtualScrollView. Slidercomponent properties.- Theming properties for the
Slidercomponent. - You can use this to change a theme for only one component, with the
themeproperty. Switchcomponent properties.- Theming properties for the
Switchcomponent. - You can use this to change a theme for only one component, with the
themeproperty. TableBodycomponent properties.TableCellcomponent properties.TableHeadcomponent properties.Tablecomponent properties.TableRowcomponent properties.- Theming properties for the
Tablecomponent. - You can use this to change a theme for only one component, with the
themeproperty. - A task’s unique identifier.
- A static layout of a UI tree that describes a set of dynamic and static nodes.
- Holds the position of a cursor in a text
ThemeProvidercomponent properties.Tooltipcomponent properties.- Theming properties for the
Tooltipcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Data of a Touch event.
- Manage the lifecyle of a collection of transitions.
- The receiving end of an unbounded mpsc channel.
- The transmission end of an unbounded mpsc channel.
- Pass uniform values to a Shader.
- Holds a rendering hook callback that allows to render to the Canvas.
- Manage an editable content.
- Manage the focus operations of given Node
- A type created by the
use_refhook. See its documentation for more details. - State that is shared between components through the context system
- A reference to a template along with any context needed to hydrate it
- A virtual node system that progresses user events and diffs UI trees.
VirtualScrollViewcomponent properties.- Data of a Wheel event.
- Configuration for a Window.
- Manager for a Window
Enums
- Indicates the current status of the accordion.
- Animation mode and configuration.
- Identifies the current status of the Button.
- A clone-on-write smart pointer.
- Group all the custom attribute types
- Current status of the DropdownItem.
- Current status of the Dropdown.
- Events emitted to the
UseEditable. - How the editable content must behave.
- Gesture emitted by the
GestureAreacomponent. - Image status.
- Enum to declare is
Inputhidden. - Indicates the current status of the Input.
- Contains the best Root node candidate from where to start measuring
- Describes the current status of the Slider.
- Describes the current status of the Switch.
- An attribute of the TemplateNode, created at compile time
- A statically known node in a layout.
- Events for TextEditor
- Configure a
Transitionanimation. - Stores the current state for a
Transition. - Uniform value to be passed to a Shader.
Constants
Traits
- A trait for giving a type a useful default value.
- A value that can be converted into an attribute value
- A trait that allows various items to be converted into a dynamic node for the rsx macro
- Every “Props” used for a component must implement the
Propertiestrait. This trait gives some hints to Dioxus on how to memoize the props and some additional optimizations that can be made. We strongly encourage using the derive macro to implement thePropertiestrait automatically as guarantee that your memoization strategy is safe. - Common trait for editable texts
- A trait to allow results to be thrown upwards to the nearest Error Boundary
Functions
Accordioncomponent.AccordionBodycomponent.AccordionSummarycomponent.Bodycomponent.Buttoncomponent.- Draw anything inside of this canvas.
CursorAreacomponent.- Make the inner children draggable to other
DropZone. - Elements from
DragZones can be dropped here. Dropdowncomponent.DropdownItemcomponent.Linkfor external locations, e.g websites.- Create inline fragments using Component syntax.
GestureAreacomponent.- Graph component.
Inputcomponent.Loadercomponent.NetworkImagecomponent.ProgressBarcomponent.ScrollViewcomponent.- Controlled
Slidercomponent. - Controlled
Switchcomponent. Tablecomponent.TableBodycomponent.TableCellcomponent.TableHeadcomponent.TableRowcomponent.- Provides a
Themefor all its children. TooltipcomponentVirtualScrollViewcomponent.- Transform some bytes (e.g: raw image, raw svg) into attribute data
- Consume context from the current scope
- Consume context from the current scope
- Get the current scope id
- This utility function launches the builder method so rsx! and html! macros can use the typed-builder pattern to initialize a component’s props.
- Check if the current scope has a context
- Provide context to the current scope
- Provide context to the the given scope
- Provide a context to the root scope
- Pushes the future onto the poll queue to be polled after the component renders.
- Informs the scheduler that this task is no longer needed and should be removed.
- Run the app
- Calculate some chained operations with a given value. This value could be for example the width of a node’s parent area.
- Schedule an update for any component given its
ScopeId. - Spawns the future but does not return the
TaskId - Spawn a future that Dioxus won’t clean up when this component is unmounted
- Suspends the current component
- Throw an error into the nearest error boundary
- Run animations.
- Run a group of animated transitions.
- Register a rendering hook to gain access to the Canvas.
- Store constant state between component renders.
- Consume some context in the tree, providing a sharable handle to the value
- Provide some context via the tree and return a reference to it
- Maintain a handle over a future that can be paused, resumed, and canceled.
- Get a handle to a coroutine higher in the tree
- Create a virtual text editor with it’s own cursor and rope.
- A hook that provides a future that executes after the hooks have been applied.
- Create a focus manager for a node.
- A future that resolves to a value.
- Sync both the Focus shared state and the platform accessibility focus
- Provide the default
Theme. - Create a focus provider.
- Provide a custom
Theme. - A hook that provides a callback that executes if the dependencies change. This is useful to avoid running computation-expensive calculations even when the data doesn’t change.
- Subscribe to a Node layout changes.
- Silently read the latest layout from a Node.
- A hook that runs a future when the component is mounted.
- 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_on_unmountDeprecated
use_refis a key foundational hook for storing state in Dioxus.- This hook provides some relatively light ergonomics around shared state.
- Provide some state for components down the hierarchy to consume without having to drill props. See
use_shared_stateto consume the state - Store state between component renders.
- Subscribe to
Themechanges.
Type Aliases
- A wrapper around the
Scopedobject that contains a reference to theScopeStateand properties for a given component.
Attribute Macros
- Streamlines component creation. This is the recommended way of creating components, though you might want lower-level control with more advanced uses.
- Derive props for a component within the component definition.
Derive Macros
- Derive macro generating an impl of the trait
Default.