Non-standard property in React Typescript

Viewed 77

In order to make a vertical slider in Firefox, you need to use the non-standard orient property. React 16 allows me to define a non-standard property on the input element, but TypeScript doesn't like that. How can I convince Typescript that I know what I'm doing and let me define a non-standard property on a DOM element in React?

Property 'orient' does not exist on type 'DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>'.  TS2322

    11 |         .map((_, i) => (
    12 |           <div key={i} className="Input">
  > 13 |             <input type="range" className="V-Slider" orient="vertical" />
       |                                                      ^
    14 |           </div>
    15 |         ))}
    16 |     </div>                                     
0 Answers
Related