Expand description
Useful imports.
Re-exports
Modules
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 rsx! 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.
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. - An attribute on a DOM node, such as
id="my-thing"orhref="https://example.com" Bodycomponent properties.- Theming properties for the
Bodycomponent. - You can use this to change a theme for only one component, with the
themeproperty. 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. - CopyValue is a wrapper around a value to make the value mutable and Copy.
CursorAreacomponent properties.- Desktop renderer for Freya.
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 boundary that will capture any errors from child components
- 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. - 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.- A signal that can be accessed from anywhere in the application and created in a static
- A signal that can be accessed from anywhere in the application and created in a static
- 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. - Theming properties for the
Iconcomponent. - 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 text line from a TextEditor
- Iterator over text lines.
- Properties for the
Linkcomponent. - Theming properties for the
Linkcomponent. - You can use this to change a theme for only one component, with the
themeproperty. Loadercomponent properties.- Theming properties for the
Loadercomponent. - You can use this to change a theme for only one component, with the
themeproperty. - A read only signal that has been mapped to a new type.
- Pressed modifier keys.
- 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
- 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.
- Information about the platform.
- Data of a Mouse event.
- Properties for the
PopupBackgroundcomponent. - Properties for the
PopupContentcomponent. - Properties for the
Popupcomponent. - Theming properties for the
Popupcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Properties for the
PopupTitlecomponent. ProgressBarcomponent properties.- Theming properties for the
ProgressBarcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - A context for signal reads and writes to be directed to
- A signal that can only be read from.
- An iterator over the values of a
Readable<Vec<T>>. - A 2d Rectangle optionally tagged with a unit.
- 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 guard 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 rendered 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. - Properties for the
SidebarItemcomponent. - Theming properties for the
SidebarItemcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Properties for the
Sidebarcomponent. - Theming properties for the
Sidebarcomponent. - You can use this to change a theme for only one component, with the
themeproperty. - Creates a new Signal. Signals are a Copy state management solution with automatic dependency tracking.
- The data stored for tracking in a signal.
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. - A thread safe storage. This is slower than the unsync storage, but allows you to share the value between threads.
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
- Events for TextEditor
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.
- The receiving end of an unbounded mpsc channel.
- The transmission end of an unbounded mpsc channel.
- Pass uniform values to a Shader.
- A unsync storage. This is the default storage type.
- Animate your elements. Use
use_animationto use this. - This callback is not generic over a return type so you can hold a bunch of callbacks at once
- Holds a rendering hook callback that allows to render to the Canvas.
- Manage an editable content.
- Manage the focus operations of given Node
- A reference to a template along with any context needed to hydrate it
- 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
- An iterator over the values of a
Writable<Vec<T>>. - A mutable reference to a signal’s value.
Enums
- Indicates the current status of the accordion.
- Controls the direction of the animation.
- Identifies the current status of the Button.
- Code is the physical position of a key.
- A clone-on-write smart pointer.
- Describes the appearance of the (usually mouse) cursor icon.
- 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.
- Describes the force of a touch event
- Gesture emitted by the
GestureAreacomponent. - Image status.
- Enum to declare is
Inputhidden. - Indicates the current status of the Input.
- Key represents the meaning of a keypress.
- Describes a button of a mouse controller.
- The type of device that triggered a Pointer event.
- 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.
- Describes touch-screen input state.
- Uniform value to be passed to a Shader.
- A signal that represents the state of a future
- A signal that represents the state of a future
Constants
Traits
- A trait for any storage backing type.
- Any component that implements the
ComponentFntrait can be used as a component. - A trait for giving a type a useful default value.
- A dependency is a trait that can be used to determine if a effect or selector should be re-run.
- A dependency is a trait that can be used to determine if a effect or selector should be re-run.
- A trait for anything that has a dynamic list of attributes
- 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. - A trait for states that can be read from like
crate::Signal,crate::GlobalSignal, orcrate::ReadOnlySignal. 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. - An extension trait for Readable<Option
> that provides some convenience methods. - An extension trait for Readable<Vec
> that provides some convenience methods. - A trait for a storage backing type. (RefCell, RwLock, etc.)
- A enhanced version of the
Fromtrait that allows with more flexibility. - A enhanced version of the
Intotrait that allows with more flexibility. - Common trait for editable texts
- A trait to allow results to be thrown upwards to the nearest Error Boundary
- A trait for states that can be read from like
crate::Signal, orcrate::GlobalSignal. 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 aWritabletype. - An extension trait for Writable<Option
> that provides some convenience methods. - An extension trait for Writable<Vec
> that provides some convenience methods.
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.- Create a new error boundary component.
- Create inline fragments using Component syntax.
GestureAreacomponent.- Graph component.
Inputcomponent.Loadercomponent.NetworkImagecomponent.Popupcomponent.ProgressBarcomponent.ScrollViewcomponent.- Props
- Props
- 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.
- Wait for the virtualdom to finish its sync work before proceeding
- Get the current render since the inception of this component
- Check if the current scope has a context
- Return the equivalent Winit’s
Keyin keyboard_types - Return the equivalent of Winit’s
PhysicalKeyin keyboard_types - Mark the current scope as dirty, causing it to re-render
- Mark the current scope as dirty, causing it to re-render
- Get the parent of the current scope if it exists
- Provide context to the current scope
- Provide a context to the root scope
- Informs the scheduler that this task is no longer needed and should be removed.
- 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 the current component
- 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
- Transform some static bytes (e.g: raw image, raw svg) into attribute data
- Suspends the current component
- Consume context from the current scope
- Consume some context in the tree, providing a sharable handle to the value
- Push this function to be run after the next render
- Animate your elements easily.
- A hook that allows you to insert a “before render” function.
- A callback that’s always current
- Register a rendering hook to gain access to the Canvas.
- 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
- 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). - Create a virtual text editor with it’s own cursor and rope.
- Create a new effect. The effect will be run immediately and whenever any signal it reads changes. The signal will be owned by the current component and will be dropped when the component is dropped.
- Provide an error boundary to catch errors from child components
- Create a focus manager for a node.
- A hook that allows you to spawn a future
- Store a value between renders. The foundational hook for all other hooks.
- A hook that uses before/after lifecycle hooks to determine if the hook was run
- Use a hook with a cleanup function
- Sync both the Focus shared state and the platform accessibility focus
- Provide the default
Theme. - Provide a custom
Theme. - Creates a new Selector that may be sync. The selector will be run immediately and whenever any signal it reads changes.
- Creates a new Selector that may be sync with some local dependencies. The selector will be run immediately and whenever any signal it reads or any dependencies it tracks changes
- Creates a new unsync Selector. The selector will be run immediately and whenever any signal it reads changes.
- Creates a new unsync Selector with some local dependencies. The selector will be run immediately and whenever any signal it reads or any dependencies it tracks changes
- Subscribe to a Node layout changes.
- Get a signal to read the latest layout from a Node.
- use_on_unmountDeprecated
- Get access to information and features of the platform.
- A memo that resolve to a value asynchronously.
- Creates a new Signal. Signals are a Copy state management solution with automatic dependency tracking.
- Creates a new `Send + Sync`` Signal. Signals are a Copy state management solution with automatic dependency tracking.
- Subscribe to
Themechanges. - Run a closure with the given owner.
Type Aliases
- A reference to a value that can be read from.
- A signal that can safely shared between threads.
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.