For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/react/Function.createElement.md.
  • English
  • @lynx-js/react / createElement

    Function: createElement()

    createElement(type, props, children)

    function createElement(
       type: "input", 
       props?: null | InputHTMLAttributes<HTMLInputElement> & ClassAttributes<HTMLInputElement>, ...
    children?: ReactNode[]): DetailedReactHTMLElement<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>

    Parameters

    ParameterType
    type"input"
    props?null | InputHTMLAttributes<HTMLInputElement> & ClassAttributes<HTMLInputElement>
    ...children?ReactNode[]

    Returns

    DetailedReactHTMLElement<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>

    Defined in

    .pnpm/@types+react@18.3.28/node_modules/@types/react/ts5.0/index.d.ts:530

    createElement(type, props, children)

    function createElement<P, T>(
       type: keyof ReactHTML, 
       props?: null | ClassAttributes<T> & P, ...
    children?: ReactNode[]): DetailedReactHTMLElement<P, T>

    Type Parameters

    Type Parameter
    P extends HTMLAttributes<T, P>
    T extends HTMLElement<T>

    Parameters

    ParameterType
    typekeyof ReactHTML
    props?null | ClassAttributes<T> & P
    ...children?ReactNode[]

    Returns

    DetailedReactHTMLElement<P, T>

    Defined in

    .pnpm/@types+react@18.3.28/node_modules/@types/react/ts5.0/index.d.ts:535

    createElement(type, props, children)

    function createElement<P, T>(
       type: keyof ReactSVG, 
       props?: null | ClassAttributes<T> & P, ...
       children?: ReactNode[]): ReactSVGElement

    Type Parameters

    Type Parameter
    P extends SVGAttributes<T, P>
    T extends SVGElement<T>

    Parameters

    ParameterType
    typekeyof ReactSVG
    props?null | ClassAttributes<T> & P
    ...children?ReactNode[]

    Returns

    ReactSVGElement

    Defined in

    .pnpm/@types+react@18.3.28/node_modules/@types/react/ts5.0/index.d.ts:540

    createElement(type, props, children)

    function createElement<P, T>(
       type: string, 
       props?: null | ClassAttributes<T> & P, ...
    children?: ReactNode[]): DOMElement<P, T>

    Type Parameters

    Type Parameter
    P extends DOMAttributes<T, P>
    T extends Element<T>

    Parameters

    ParameterType
    typestring
    props?null | ClassAttributes<T> & P
    ...children?ReactNode[]

    Returns

    DOMElement<P, T>

    Defined in

    .pnpm/@types+react@18.3.28/node_modules/@types/react/ts5.0/index.d.ts:545

    createElement(type, props, children)

    function createElement<P>(
       type: FunctionComponent<P>, 
       props?: null | Attributes & P, ...
    children?: ReactNode[]): FunctionComponentElement<P>

    Type Parameters

    Type Parameter
    P extends object

    Parameters

    ParameterType
    typeFunctionComponent<P>
    props?null | Attributes & P
    ...children?ReactNode[]

    Returns

    FunctionComponentElement<P>

    Defined in

    .pnpm/@types+react@18.3.28/node_modules/@types/react/ts5.0/index.d.ts:553

    createElement(type, props, children)

    function createElement<P, T, C>(
       type: ClassType<P, T, C>, 
       props?: null | ClassAttributes<T> & P, ...
    children?: ReactNode[]): CElement<P, T>

    Type Parameters

    Type Parameter
    P extends object
    T extends Component<P, any, any, T>
    C extends ComponentClass<P, any, C>

    Parameters

    ParameterType
    typeClassType<P, T, C>
    props?null | ClassAttributes<T> & P
    ...children?ReactNode[]

    Returns

    CElement<P, T>

    Defined in

    .pnpm/@types+react@18.3.28/node_modules/@types/react/ts5.0/index.d.ts:558

    createElement(type, props, children)

    function createElement<P>(
       type: string | FunctionComponent<P> | ComponentClass<P, any>, 
       props?: null | Attributes & P, ...
    children?: ReactNode[]): ReactElement<P>

    Type Parameters

    Type Parameter
    P extends object

    Parameters

    ParameterType
    typestring | FunctionComponent<P> | ComponentClass<P, any>
    props?null | Attributes & P
    ...children?ReactNode[]

    Returns

    ReactElement<P>

    Defined in

    .pnpm/@types+react@18.3.28/node_modules/@types/react/ts5.0/index.d.ts:563

    Example

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.