@instructure/ui-themes
v10.10.0
Published
A library of instructure themes
Downloads
63,825
Maintainers
Keywords
Readme
category: packages
ui-themes
Installation
npm install @instructure/ui-themes
Usage
Before mounting (rendering) your React application:
application level theming:
--- type: code --- import canvas from '@instructure/ui-themes' ReactDOM.render( <InstUISettingsProvider theme={canvas}> <App /> </InstUISettingsProvider>, element )
(DEPRECATED) global theming:
--- type: code --- import canvas from '@instructure/ui-themes' canvas.use()
To override the theme variables:
(DEPRECATED) globally:
--- type: code --- import canvas from '@instructure/ui-themes' canvas.use({ overrides: { colors: { brand: 'red' } } })
application level:
--- type: code --- import canvas from '@instructure/ui-themes' const themeOverrides = { colors: { brand: 'red' } } ReactDOM.render( <InstUISettingsProvider theme={{ ...canvas, ...themeOverrides }}> <App /> </InstUISettingsProvider>, element )
You can read more about how our theming system works and how to use it here