JSPM

@instructure/ui-themes

10.20.2-snapshot-4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10988
  • Score
    100M100P100Q138399F
  • License MIT

A library of instructure themes

Package Exports

  • @instructure/ui-themes
  • @instructure/ui-themes/es/index.js
  • @instructure/ui-themes/lib
  • @instructure/ui-themes/lib/index.js
  • @instructure/ui-themes/lib/sharedThemeTokens/colors/primitives.js
  • @instructure/ui-themes/lib/themes/canvas
  • @instructure/ui-themes/lib/themes/canvas/index.js
  • @instructure/ui-themes/lib/themes/canvasHighContrast
  • @instructure/ui-themes/lib/themes/canvasHighContrast/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@instructure/ui-themes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme


category: packages

ui-themes

npm MIT License Code of Conduct

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