JSPM

@instructure/canvas-high-contrast-theme

10.16.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6530
  • Score
    100M100P100Q143491F
  • License MIT

A high contrast theme for Canvas LMS made by Instructure Inc.

Package Exports

  • @instructure/canvas-high-contrast-theme
  • @instructure/canvas-high-contrast-theme/es/index.js
  • @instructure/canvas-high-contrast-theme/lib/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/canvas-high-contrast-theme) 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

canvas-high-contrast-theme

npm MIT License Code of Conduct

A high contrast UI component theme for Canvas LMS made by Instructure Inc.

This theme meets the WCAG 2 Level AA 4.5:1 minimum contrast requirements.

Installation

npm install @instructure/canvas-high-contrast-theme

Usage

Before mounting (rendering) your React application:

  • global theming:

    import { theme } from '@instructure/canvas-high-contrast-theme'
    
    theme.use()
  • application level theming:

    import { theme } from '@instructure/canvas-high-contrast-theme'
    
    ReactDOM.render(
      <InstUISettingsProvider theme={theme}>
        <App />
      </InstUISettingsProvider>,
      element
    )

To override the variables:

  • globally:

    import { theme } from '@instructure/canvas-high-contrast-theme'
    
    theme.use({ overrides: { spacing: { xxxSmall: '0.3rem' } } })
  • application level:

    import { theme } from '@instructure/canvas-high-contrast-theme'
    const themeOverrides = { spacing: { xxxSmall: '0.3rem' } }
    
    ReactDOM.render(
      <InstUISettingsProvider theme={{ ...theme, ...themeOverrides }}>
        <App />
      </InstUISettingsProvider>,
      element
    )