Composition
The
render
prop makes Ariakit components more versatile, allowing you to easily replace the default HTML element or enhance its features with custom components.
Changing the HTML element
The
render
prop lets you specify a different HTML element to be rendered instead of the default element.
For instance, the
Textarea with inline Combobox
example uses the
render
prop to replace the default
input
element rendered by the
Combobox
component with a
textarea
element. You can pass specific
textarea
props to the element directly: