@instructure/canvas-theme
TypeScript icon, indicating that this package has built-in type declarations

8.55.0 • Public • Published

category: packages

canvas-theme

npm  MIT License  Code of Conduct

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

This theme has a 3:1 minimum contrast requirement.

Installation

npm install @instructure/canvas-theme

Usage

Before mounting (rendering) your React application:

  • global theming:

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

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

To override the variables:

  • globally:

    import { theme } from '@instructure/canvas-theme'
    
    theme.use({ overrides: { colors: { brand: 'red' } } })
  • application level:

    import { theme } from '@instructure/canvas-theme'
    const themeOverrides = { colors: { brand: 'red' } }
    
    ReactDOM.render(
      <InstUISettingsProvider theme={{ ...theme, ...themeOverrides }}>
        <App />
      </InstUISettingsProvider>,
      element
    )

Readme

Keywords

none

Package Sidebar

Install

npm i @instructure/canvas-theme

Weekly Downloads

12,467

Version

8.55.0

License

MIT

Unpacked Size

137 kB

Total Files

14

Last publish

Collaborators

  • bpjatacsuk
  • ajmal-esa
  • razorsh4rk
  • david.wenzlick.inst
  • robinkuss64
  • ardena
  • jcflow
  • jguardadom
  • jdewar
  • xcudder
  • ericsaupe
  • joyenjoyer
  • omarpr
  • cguanzon-inst
  • sarahgerard
  • jacksonhowe
  • jakeoeding
  • camray
  • cjs118
  • matyas.szabo
  • herrtopi
  • angela.gomba
  • kyler-instructure
  • instuici
  • eschiebel
  • maths22
  • jcrystal
  • skacsmark
  • itadmins
  • quizzesuici
  • instructure-toolsmiths-service-user
  • aogata-inst
  • instout