react-scrollbars-custom icon indicating copy to clipboard operation
react-scrollbars-custom copied to clipboard

Can this be applied to a textarea?

Open keithpickering opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe. Seems like a common use case but I can't find anything about it. We can apply custom scrollbars to any element, but not a textarea

Describe the solution you'd like Using the renderer prop makes sense, but I'm not sure if this works since it would be adding a bunch of extra html inside the textarea (likely not valid)

<Scrollbar
  elementRef={this.input}
  renderer={props => {
    const { elementRef, restProps } = props;
    return <textarea {...restProps} ref={elementRef} />
  }}
/>

Describe alternatives you've considered Contenteditable seems like a hack that could negatively affect accessibility

keithpickering avatar May 25 '21 14:05 keithpickering