You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When InstUI needs to make a breaking change to a component (renamed props, changed behaviour, etc.), the old version is **kept alongside the new one** instead of being replaced. Upgrading the library no longer forces you to immediately rewrite every component usage — you can migrate to new versions on your own schedule.
10
+
11
+
New component versions appear with InstUI **minor** version bumps (e.g. `11.7` → `11.8`). Patch releases never include breaking changes.
12
+
13
+
> The docs UI "Component version" selector labels library `v11_6` as **`v1 (legacy)`** and library `v11_7` as **`v2`**. This page uses the `v11_X` form because it matches the actual NPM import paths.
14
+
15
+
## Import paths
16
+
17
+
Every InstUI component package supports three import styles:
18
+
19
+
### Default — `@instructure/ui-<name>`
20
+
21
+
Always points to the **oldest** still-supported component version. Upgrading the library without changing your imports will keep your code working without surprises.
22
+
23
+
```js
24
+
---
25
+
type: code
26
+
---
27
+
import { Alert } from'@instructure/ui-alerts'
28
+
```
29
+
30
+
### Pinned — `@instructure/ui-<name>/v11_X`
31
+
32
+
Locks the import to a specific InstUI minor version of the component. When you are ready to adopt a breaking change, update the path to the next pinned version.
InstUI also ships an umbrella package, `@instructure/ui`, which re-exports every component from the individual `@instructure/ui-*` packages. Two equivalent import styles work — both resolve to the same component:
The same three path styles (default / `/v11_X` / `/latest`) work on the umbrella package as well. Pick per-package imports when you want better tree-shaking and only pull in what you use, or the umbrella package when you'd rather depend on a single `@instructure/ui` entry in your `package.json`.
68
+
69
+
## Versions and theming engines
70
+
71
+
InstUI is in the middle of a transition between two theming systems. Which engine a component uses depends on which version you import:
72
+
73
+
-**`v1`** (library `v11_6` and earlier) — legacy theming. Components are configured through the Canvas theme variables and the `themeOverride` prop, which accepts a function or object that maps to the component's own theme map. See the [Legacy theme overrides](legacy-theme-overrides) guide.
74
+
75
+
-**`v2`** (library `v11_7` and newer) — new theming system. Components consume pre-resolved design tokens, and theming is done through the new token override structure. See the [New theme overrides](new-theme-overrides) guide.
76
+
77
+
Mixing imports from both groups in the same app is fully supported — the two engines run side-by-side without conflict.
78
+
79
+
### Supported themes per version
80
+
81
+
Each version of the library is only compatible with the themes built for its theming engine:
82
+
83
+
-**`v1`** (library `v11_6` and earlier) supports the legacy themes:
84
+
85
+
-`canvas`
86
+
-`canvasHighContrast`
87
+
88
+
-**`v2`** (library `v11_7` and newer) supports themes built on the new token system. The legacy Canvas looks are preserved (re-implemented on the new engine) and two brand-new themes are added:
89
+
90
+
-`legacyCanvas` — same visual style as the old `canvas`, but on the new engine
91
+
-`legacyCanvasHighContrast` — same visual style as the old `canvasHighContrast`, on the new engine
92
+
-`light` — new light theme
93
+
-`dark` — new dark theme
94
+
95
+
This means that when you move a component import from `/v11_6` to `/v11_7` you don't have to change anything visually — you can stay on the `legacyCanvas` theme and opt in to `light` or `dark` only when you're ready.
Copy file name to clipboardExpand all lines: docs/theming/legacy-theme-overrides.md
-9Lines changed: 0 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,6 @@ relevantForAI: true
7
7
8
8
## Using theme overrides
9
9
10
-
```js
11
-
---
12
-
type: embed
13
-
---
14
-
<Alert variant="warning" margin="0 0 medium">
15
-
The examples on this page use the <strong>legacy theming system</strong> and are designed for<strong>v11.6</strong>components. If you are viewing the v11.7 version, <Link href={window.location.pathname.match(/v\d+_\d+/) ?window.location.pathname.replace(/v\d+_\d+/, 'v11_6') :`/v11_6${window.location.pathname}`}>switch to v11.6</Link> to see the examples working correctly.
16
-
</Alert>
17
-
```
18
-
19
10
This document gives an overview on how you can customize Instructure UI components by tweaking their theme variables.
20
11
While this gives you a level of flexibility on the look and feel of the components you should be aware of 2 things:
Copy file name to clipboardExpand all lines: docs/theming/new-theme-overrides.md
+45-11Lines changed: 45 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,6 @@ relevantForAI: true
7
7
8
8
## New Theme Override Patterns
9
9
10
-
```js
11
-
---
12
-
type: embed
13
-
---
14
-
<Alert variant="warning" margin="0 0 medium">
15
-
The examples on this page use the <strong>newtheming system</strong> and require <strong>v11.7+</strong>components. If you are viewing the v11.6 version, <Link href={window.location.pathname.match(/v\d+_\d+/) ?window.location.pathname.replace(/v\d+_\d+/, 'v11_7') :`/v11_7${window.location.pathname}`}>switch to v11.7</Link> to see the examples working correctly.
16
-
</Alert>
17
-
```
18
-
19
10
This guide covers all the override patterns available in the new theming system (v11.7+). The new system uses a layered token architecture: **primitives** (raw values) -> **semantics** (meaning) -> **components** (per-component tokens).
20
11
21
12
Overrides are applied via the `themeOverride` prop on `InstUISettingsProvider`, which is separate from the `theme` prop. The `theme` prop replaces the active theme entirely; `themeOverride` layers modifications on top.
@@ -527,9 +518,52 @@ type: example
527
518
</InstUISettingsProvider>
528
519
```
529
520
530
-
### 13. Provider-level overrides cannot target a child component selectively
521
+
### 13. Independent overrides for child parts of compound components
522
+
523
+
Most compound components expose each part as a separate component with its own `componentId`. This means you can independently override each part via `components` — both overrides take effect:
Because `Button`uses`BaseButton`'s theme internally, a `components.Button`entry in the provider's `themeOverride` does **not** override `BaseButton`'s tokens for `Button` instances only. Both `BaseButton` and `Button`share the same `BaseButton` theme variables, so a `components.BaseButton` override affects both, regardless of whether a separate `components.Button`entry is also present.
566
+
**Exception — `Button`and`BaseButton`:**`Button`uses `BaseButton`'s `componentId` internally, so `components.Button`has no effect. A `components.BaseButton` override affects all `BaseButton` instances including those rendered inside `Button`— there is no way to target only one:
0 commit comments