Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can this be applied to a textarea? #174

Open
keithpickering opened this issue May 25, 2021 · 0 comments
Open

Can this be applied to a textarea? #174

keithpickering opened this issue May 25, 2021 · 0 comments

Comments

@keithpickering
Copy link

keithpickering commented May 25, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant