-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
brainstormingBrainstorming issueBrainstorming issuenew componentInvolves creating a new componentInvolves creating a new component
Description
Converted to a tracking + discussion issue for custom components.
Context
to follow
Parts
-
FE support for arbitrary components being loaded + mounted
- A way to register components of any description internally (no user impact)
- A consistent (versioned) interface for components + access to app level metadata (minor)
-
BE support for custom components
- A way to generate a component for use in gradio (minor)
- A consistent interface for all components (args, classes to extend, methods that must be present, urils etc that can be used by authors (di or import))
-
A way to share custom components
- See theme sharing proposal
- More complex than themes as the JS etc cannot be generated by the BE and passed to the frontend
- Svelte or any? Build process? action/ build server?
-
A way to consume custom components
- APIs
- CDN or self host?
-
DX
- how will a user develop and test their custom component?
- How will a user use theme values such that their custom component will automatically be themed when a user passes in a new theme?
- Can be make utils/ components/ whatever available to users as building blocks for their components?
- How do we document all of this stuff?
I envisage many kinds of custom components:
- fully custom with a new python + html/js/css
- either extending from existing gradio components or fully custom implementations
- pure frontend components that use some gradio python class. Basically a new frontend for existing components
- Pure python components.
- Something like the above, composition for components with a new interface
- or new python implementation for an existing component that will use an existing frontend. (Maybe is changes stuff like preprocessing or w/e)
These are the core usecases I think we need to cover.
More detail to follow
Original
We've heard requests from many different places (Discord, #1410) on folks who want to create plugins / custom components in Gradio. We should think about how we want to support this (do we want plugins that are not part of the main library?) and write up a Guide showing how to contribute these kinds of pulgins / components.
cc @pngwn
radames, GuillemGSubies, katielink and pangyuteng
Metadata
Metadata
Assignees
Labels
brainstormingBrainstorming issueBrainstorming issuenew componentInvolves creating a new componentInvolves creating a new component