Expand description
Useful imports.
Re-exports§
Modules§
Macros§
- Alias forCow::Borrowed, because that’s used a million times so shortening it is nice. Makes the code more readable.
- This macro is used to generate aimpl Defaultblock for any type with the function new_maybe_sync that takes a genericT
- Example usage:
- This macro is used to generateimpl PartialEqblocks for any Readable type that takes a genericT
- This macro is used to generateimpl Display, andimpl Debugblocks for any Readable type that takes a genericT
- Start the hot reloading server with the current directory as the root
- This macro is used to generateimpl Display,impl Debug,impl PartialEq, andimpl Eqblocks for any Readable type that takes a genericT
- 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.
- CreateFooThemeWithstructs without having to deal with the verbose syntax.
- A helper macro for cloning multiple values at once
- This macro has three arguments separator by commas.
- A helper macro foruse_reactivethat merges uses the closure syntax to elaborate the dependency array
- This macro is used to generateimpl Add,impl AddAssign,impl Sub,impl SubAssign,impl Mul,impl MulAssign,impl Div, andimpl DivAssignblocks for any Writable type that takes a genericT
Structs§
- Properties for theAccordionBodycomponent.
- Properties for theAccordioncomponent.
- Properties for theAccordionSummarycomponent.
- Theming properties for theAccordioncomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theActivableRoutecomponent.
- Animate a color.
- Animate a numeric value.
- Properties for theArrowIconcomponent.
- Configuration for a given Asset.
- An attribute on a DOM node, such asid="my-thing"orhref="https://example.com"
- Properties for theBodycomponent.
- Theming properties for theBodycomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theButtoncomponent.
- Theming properties for theButtoncomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theCanvascomponent.
- Theming properties for theCanvascomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theCheckboxcomponent.
- Theming properties for theCheckboxcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- CopyValue is a wrapper around a value to make the value mutable and Copy.
- Properties for theCrossIconcomponent.
- Properties for theCursorAreacomponent.
- Desktop renderer using Skia, Glutin and Winit
- Properties for theDragProvidercomponent.
- Properties for theDragZonecomponent.
- Properties for theDropZonecomponent.
- Properties for theDropdownItemcomponent.
- Theming properties for theDropdownItemcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theDropdowncomponent.
- Theming properties for theDropdowncomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Create a configuration for aUseEditable.
- A handle to an effect.
- 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 thersx!macro when anonfield is specified for components.
- Data of a Keyboard event.
- Just like a TreeItem for flattened. Use this when rendering the items.
- Theming properties for Fonts.
- You can use this to change a theme for only one component, with thethemeproperty. Theming properties for Fonts.
- Properties for theGestureAreacomponent.
- 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 theGraphcomponent.
- Properties for theGraphcomponent.
- Theming properties for theGraphcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Theming properties for theIconcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theInputcomponent.
- Theming properties for theInputcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Data of a Keyboard event.
- Launch configuration.
- Cached layout results of a Node
- A text line from a TextEditor
- Iterator over text lines.
- Properties for theLinkcomponent.
- Theming properties for theLinkcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theLoadercomponent.
- Theming properties for theLoadercomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- A read only signal that has been mapped to a new type.
- A value that is memoized. This is useful for caching the result of a computation.
- Properties for theMenuButtoncomponent.
- Properties for theMenuContainercomponent.
- Theming properties for theMenuContainercomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theMenuItemcomponent.
- Theming properties for theMenuItemcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theMenucomponent.
- Pressed modifier keys.
- Data of a Mouse event.
- Properties for theNativeContainercomponent.
- Properties for theNativeRoutercomponent.
- Properties for theNetworkImagecomponent.
- Theming properties for theNetworkImagecomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Node layout configuration
- 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.
- Data of a Mouse event.
- Properties for thePopupBackgroundcomponent.
- Properties for thePopupContentcomponent.
- Properties for thePopupcomponent.
- Theming properties for thePopupcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for thePopupTitlecomponent.
- Properties for theProgressBarcomponent.
- Theming properties for theProgressBarcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theRadiocomponent.
- Theming properties for theRadiocomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- 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 aReadable<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.
- Properties for theScrollBarcomponent.
- Theming properties for theScrollBarcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theScrollThumbcomponent.
- Properties for theScrollViewcomponent.
- Theming properties for theScrollViewcomponent. Also used byVirtualScrollView.
- You can use this to change a theme for only one component, with thethemeproperty. Also used byVirtualScrollView.
- Properties for theSidebarItemcomponent.
- Theming properties for theSidebarItemcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theSidebarcomponent.
- Theming properties for theSidebarcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Creates a new Signal. Signals are a Copy state management solution with automatic dependency tracking.
- The data stored for tracking in a signal.
- Properties for theSlidercomponent.
- Theming properties for theSlidercomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for the [SnackBarBox] component.
- Properties for theSnackBarcomponent.
- Theming properties for theSnackBarcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theSubMenucomponent.
- Properties for theSwitchcomponent.
- Theming properties for theSwitchcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- A thread safe storage. This is slower than the unsync storage, but allows you to share the value between threads.
- Properties for theTabcomponent.
- Theming properties for theTabcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theTableBodycomponent.
- Properties for theTableCellcomponent.
- Properties for theTableHeadcomponent.
- Properties for theTablecomponent.
- Properties for theTableRowcomponent.
- Theming properties for theTablecomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theTabsbarcomponent.
- 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
- Properties for theThemeProvidercomponent.
- Properties for theTickIconcomponent.
- Properties for theTilecomponent.
- Theming properties for theTilecomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- Properties for theTooltipcomponent.
- Theming properties for theTooltipcomponent.
- You can use this to change a theme for only one component, with thethemeproperty.
- 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. Useuse_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
- Form controller
- 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.
- Properties for theVirtualScrollViewcomponent.
- Data of a Wheel event.
- Configuration for a Window.
- Properties for theWindowDragAreacomponent.
- An iterator over the values of aWritable<Vec<T>>.
- A mutable reference to a signal’s value.
Enums§
- Indicates the current status of the accordion.
- Controls the direction of the animation.
- Defines the duration for which an Asset will remain cached after it’s user has stopped using it. The default is 1h (3600s).
- An error that can occur when trying to borrow a value.
- An error that can occur when trying to borrow a value mutably.
- 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 theUseEditable.
- How the editable content must behave.
- Indicates the state of the item.
- Describes the force of a touch event
- Gesture emitted by theGestureAreacomponent.
- Enum to declare isInputhidden.
- Indicates the current status of the Input.
- Key represents the meaning of a keypress.
- Tooltip configuration for theLinkcomponent.
- Indicates the current status of the MenuItem.
- Describes a button of a mouse controller.
- What to do once the animation finishes. By default it isStop
- Sorting direction for items inTable.
- 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.
- Current status of the Tab.
- An attribute of the TemplateNode, created at compile time
- A statically known node in a layout.
- Indicates the type of text dragging being done.
- Indicates the current status of the Tile.
- Describes touch-screen input state.
- Item part of a larget Tree.
- Uniform value to be passed to a Shader.
- A signal that represents the state of a future
- A signal that represents the state of the resource
Constants§
Traits§
- A trait for any storage backing type.
- Any component that implements theComponentFntrait 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
- Abstract the path matching.
- Every “Props” used for a component must implement thePropertiestrait. 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 likecrate::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 theFromtrait that allows with more flexibility.
- A enhanced version of theIntotrait 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 likecrate::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§
- Show other elements under a collapsable box.
- Intended to wrap the body of anAccordion.
- Intended to use as summary for anAccordion.
- Provide a context to the inner components so they can know whether the passed route is the current router in the Router or not.
- Icon component for an Arrow.
- Usually used to wrap the application root component.
- Clickable button.
- Draw anything inside of this canvas.
- ControlledCheckboxcomponent.
- Icon component for a Cross.
- Change the cursor icon when it’s hovering over this component.
- Make the inner children draggable to otherDropZone.
- Elements fromDragZones can be dropped here.
- Select from multiple options, use alongsideDropdownItem.
- Styling
- Create a new error boundary component.
- Create inline fragments using Component syntax.
- Detect complex touch gestures such asGesture::DoubleTap.
- Graph component.
- Small box to edit text.
- Styling
- Floating menu, use alongsideMenuItem.
- Like a button, but forMenus.
- Wraps the body of aMenu.
- Styling
- Provides native functionalities for a dioxus-router.
- Image component that automatically fetches and caches remote (HTTP) images.
- Floating window intended for quick interactions. Also calledDialogin other frameworks.
- The background of thePopupcomponent.
- Optionally wrap the content of yourPopupin a styled container.
- Optionally use a styled title inside aPopup.
- Display the progress of something visually. For example: downloading files, fetching data, etc.
- ControlledRadiocomponent.
- Scroll bar used forcrate::ScrollViewandcrate::VirtualScrollView.
- Scroll thumb used forcrate::ScrollViewandcrate::VirtualScrollView.
- Scrollable area with bidirectional support and scrollbars.
- Props
- Props
- ControlledSlidercomponent.
- SnackBarcomponent. Use in combination with other components.
- Create sub menus inside aMenu.
- Display whether a state istrueorfalse. Commonly used for enabled/disabled scenarios. Example: light/dark theme.
- The body of aTable.
- Cell for aTable. You can place anything inside.
- Horizontal container for Tabs. Use in combination withTab
- Provides aThemefor all its children.
- Icon component for a Tick.
- Tile component to be used with [Radio] and [Checkbox].
- Tooltipcomponent
- One-direction scrollable area that dynamically builds and renders items based in their size and current available size, this is intended for apps using large sets of data that need good performance.
- Allow dragging the window when the cursor drag this component with a left mouse click.
- Consume context from the current scope
- Consume context from the current scope
- Returns the current owner. This owner will be used to drop anyCopystate that is created by thegenerational-boxcrate.
- Get the current scope id
- Transform some dynamic bytes (e.g: remote image fetched at runtime) into an attribute
- This utility function launches the builder method so rsx! and html! macros can use the typed-builder pattern to initialize a component’s props.
- Get the current render since the inception of this component
- Check if the current scope has a context
- Return the equivalent Winit’sKeyin keyboard_types
- Return the equivalent of Winit’sPhysicalKeyin 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 itsScopeId.
- Spawns the future but does not return the [TaskId]
- Spawn a future that Dioxus won’t clean up when this component is unmounted
- Start a new future on the same thread as the rest of the VirtualDom.
- Transform some static bytes (e.g: statically linked images or SVGs) into an attribute
- Suspended the current component on a specific task and then return None
- 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.
- Global caching system for assets.
- 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. Reactivity managed through signals.
- Register a rendering hook to gain access to the Canvas. Reactivity managed with manual dependencies.
- 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 Analagous to use_context_provider and use_context, but used for coroutines specifically See the docs foruse_coroutinefor more details.
- 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 withuse_effect).
- Create a virtual text editor with it’s own cursor and rope.
- use_effectwill subscribe to any changes in the signal values it captures effects will always run after first mount and then whenever the signal values change If the use_effect call was skipped due to an early return, the effect will no longer activate.
- Provide an error boundary to catch errors from child components
- Create a focus manager for a node.
- Create a Form controller with a submit callback.
- A hook that allows you to spawn a future. This future will not run on the server The future is spawned on the next call towait_for_next_renderwhich means that it will not run on the server. To run a future on the server, you should usespawndirectly.use_futurewon’t return a value. If you want to return a value from a future, useuse_resourceinstead.
- 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
- Initialize the global caching system for assets.
- Provide the defaultTheme.
- Keep some native features (focused element, preferred theme, etc) on sync between the platform and the components
- Provide a customTheme.
- Creates a new Memo. The memo will be run immediately and whenever any signal it reads 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.
- Get access to information from the platform.
- Access the preferred theme selected by the user.
- 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.
- A memo that resolves to a value asynchronously. Similar touse_futurebutuse_resourcereturns a value. SeeResourcefor more details.
- 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 toThemechanges.
- Wait for the next render to complete
- 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.
- A reference to a value that can be read from.
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 traitDefault.