__init__(self, *args, **kwargs) | Initialize the component. |
_create_event_chain(self, event_trigger: 'str', value: 'Union[Var, EventHandler, EventSpec, List[Union[EventHandler, EventSpec]], Callable]') -> 'Union[EventChain, Var]' | Create an event chain from a variety of input types. |
get_event_triggers(self) -> 'Dict[str, Any]' | Get the event triggers for the component. |
get_triggers(self) -> 'Set[str]' | Get the triggers for non controlled events [DEPRECATED]. |
get_controlled_triggers(self) -> 'Dict[str, Var]' | Get the event triggers that pass the component's value to the handler [DEPRECATED]. |
__repr__(self) -> 'str' | Represent the component in React. |
__str__(self) -> 'str' | Represent the component in React. |
_render(self) -> 'Tag' | Define how to render the component in React. |
add_style(self, style: 'ComponentStyle') -> 'Component' | Add additional style to the component and its children. |
render(self) -> 'Dict' | Render the component. |
_validate_component_children(self, children: 'List[Component]') | Validate the children components. |
_get_custom_code(self) -> 'Optional[str]' | Get custom code for the component. |
get_custom_code(self) -> 'Set[str]' | Get custom code for the component and its children. |
_get_dynamic_imports(self) -> 'Optional[str]' | Get dynamic import for the component. |
get_dynamic_imports(self) -> 'Set[str]' | Get dynamic imports for the component and its children. |
get_imports(self) -> 'imports.ImportDict' | Get all the libraries and fields that are used by the component. |
_get_mount_lifecycle_hook(self) -> 'str | None' | Generate the component lifecycle hook. |
_get_ref_hook(self) -> 'str | None' | Generate the ref hook for the component. |
_get_hooks_internal(self) -> 'Set[str]' | Get the React hooks for this component managed by the framework.
Downstream components should NOT override this method to avoid breaking
framework functionality. |
_get_hooks(self) -> 'Optional[str]' | Get the React hooks for this component.
Downstream components should override this method to add their own hooks. |
get_hooks(self) -> 'Set[str]' | Get the React hooks for this component and its children. |
get_ref(self) -> 'Optional[str]' | Get the name of the ref for the component. |
get_refs(self) -> 'Set[str]' | Get the refs for the children of the component. |
get_custom_components(self, seen: 'Optional[Set[str]]' = None) -> 'Set[CustomComponent]' | Get all the custom components used by the component. |