CSSCustomProperties
Type Alias: CSSCustomProperties
type CSSCustomProperties = React.CSSProperties & object
Defined in: src/types/CSS-Custom-Properties.tsx:13
Type extension for REACT.CSSProperties that allows safe use of custom CSS properties
Normally, React.CSSProperties only accepts standard CSS properties, but with this extension, you can safely use custom properties (CSS variables) as well.
CSSCustomProperties extends React.CSSProperties with an index signature that matches
any key starting with --
, typed as string | number
. This enables type-safe inline
styles for CSS variables in React components.