Customization

Component elements can be changed by using ...Render props.

Each ...Render prop requires a function: RenderEvent => React.ReactNode

RenderEvent has the original elemnent and all its props.

Adding attributes to elements


<L.Input
  inputRender={({ Element, elementProps }) => <Element {...elementProps} aria-test-attribute />}
  _w-48
/>

Each component has its own set of customizators, see the documentation.

RenderEvent props

NameDescription
ElementThe element, use it or replace it to a different one
elementPropsElement props, all you need to make the element work properly
componentPropsComponent props in case you need something from the outer space
componentStateThe component state in case you need to know what is going on in there