def _post_init(self, **kwargs):
        """Initialize the custom component.

        Args:
            **kwargs: The kwargs to pass to the component.
        """
        component_fn = kwargs.get("component_fn")

        # Set the props.
        props_types = typing.get_type_hints(component_fn) if component_fn else {}
        props = {key: value for key, value in kwargs.items() if key in props_types}
        kwargs = {key: value for key, value in kwargs.items() if key not in props_types}

        event_types = {
            key
            for key in props
            if (
                (get_origin((annotation := props_types.get(key))) or annotation)
                == EventHandler
            )
        }

        def get_args_spec(key: str) -> types.ArgsSpec | Sequence[types.ArgsSpec]:
            type_ = props_types[key]

            return (
                args[0]
                if (args := get_args(type_))
                else (
                    annotation_args[1]
                    if get_origin(
                        annotation := inspect.getfullargspec(component_fn).annotations[
                            key
                        ]
                    )
                    is typing.Annotated
                    and (annotation_args := get_args(annotation))
                    else no_args_event_spec
                )
            )

        super()._post_init(
            event_triggers={
                key: EventChain.create(
                    value=props[key],
                    args_spec=get_args_spec(key),
                    key=key,
                )
                for key in event_types
            },
            **kwargs,
        )

        to_camel_cased_props = {
            format.to_camel_case(key) for key in props if key not in event_types
        }
        self.get_props = lambda: to_camel_cased_props  # pyright: ignore [reportIncompatibleVariableOverride]

        # Unset the style.
        self.style = Style()

        # Set the tag to the name of the function.
        self.tag = format.to_title_case(self.component_fn.__name__)

        for key, value in props.items():
            # Skip kwargs that are not props.
            if key not in props_types:
                continue

            camel_cased_key = format.to_camel_case(key)

            # Get the type based on the annotation.
            type_ = props_types[key]

            # Handle event chains.
            if type_ is EventHandler:
                inspect.getfullargspec(component_fn).annotations[key]
                self.props[camel_cased_key] = EventChain.create(
                    value=value, args_spec=get_args_spec(key), key=key
                )
                continue

            value = LiteralVar.create(value)
            self.props[camel_cased_key] = value
            setattr(self, camel_cased_key, value)
Initialize the custom component.

        Args:
            **kwargs: The kwargs to pass to the component.
        
reflex/components/component.py