Skip to content

Conversation

ealmloff
Copy link
Member

@ealmloff ealmloff commented Sep 17, 2025

Adds a few commands to manage dioxus components in your project:

# Adds the tabs component from the default registry to the components module
# along with any rust and component dependencies it may have.
dx component add tabs
# Removes the tabs component from the components module
dx component remove tabs
# Lists all components in the default registry
dx component list
# Update the registry cache. The next time a component is added, it will use the latest version
dx component update
# Print the json schema for the component.json file required for all components in registries
dx component schema

This pulls from the manifest in the components repo

@ealmloff ealmloff added enhancement New feature or request cli Related to the dioxus-cli program labels Sep 17, 2025
@ealmloff ealmloff marked this pull request as ready for review September 19, 2025 14:24
@ealmloff ealmloff requested a review from a team as a code owner September 19, 2025 14:24
@Jasper-Bekkers
Copy link

Jasper-Bekkers commented Sep 22, 2025

After discussing about this in Discord a bit a few smaller things came up so far in my testing;

  1. It would be really nice if this picked up the assets-path and module-path from Dioxus.toml to it places the files and folders in the right directory
  2. Having a shorthand notation for adding all components would be really helpful to set up an initial project

@ealmloff
Copy link
Member Author

After discussing about this in Discord a bit a few smaller things came up so far in my testing;

  1. It would be really nice if this picked up the assets-path and module-path from Dioxus.toml to it places the files and folders in the right directory

You can now set the application.asset_dir for assets to be placed into, component.registry for the default registry and component.component_dir for where components will be copied to

  1. Having a shorthand notation for adding all components would be really helpful to set up an initial project

You can now add multiple components separated by commas or add all components in a registry: dx component add toast,tabs or dx component add --all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the dioxus-cli program enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants