添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Ariakit
/

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:

<Combobox render={<textarea rows={5} />} />