Socket
Socket
Sign inDemoInstall

@instructure/ui-themes

Package Overview
Dependencies
4
Maintainers
33
Versions
1854
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@instructure/ui-themes


Version published
Weekly downloads
29K
decreased by-15.02%
Maintainers
33
Created
Weekly downloads
 

Readme

Source

category: packages

ui-themes

npm  MIT License  Code of Conduct

Installation

npm install @instructure/ui-themes

Usage

Before mounting (rendering) your React application:
  • global theming:

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

    import { canvas } from '@instructure/ui-themes'
    
    ReactDOM.render(
      <InstUISettingsProvider theme={canvas}>
        <App />
      </InstUISettingsProvider>,
      element
    )
    
To override the theme variables:
  • globally:

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

    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

FAQs

Last updated on 06 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc