Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
2f4317a
chore: Updated Buttons with new styling
josh-bagwell Jun 15, 2026
72f302f
Merge branch 'prerelease/major' of github.com:Workday/canvas-kit into…
josh-bagwell Jun 15, 2026
3a364dd
chore: Updated styles for Secondary and Tertiary
josh-bagwell Jun 15, 2026
33a6c66
chore: Updated minWidth
josh-bagwell Jun 15, 2026
79482da
chore: Remove unused import
josh-bagwell Jun 16, 2026
c5cd310
chore: Updated styles with temp css variables
josh-bagwell Jun 17, 2026
f80148a
Merge branch 'prerelease/major' of github.com:Workday/canvas-kit into…
josh-bagwell Jun 17, 2026
43a2573
chore: Removed unused lines
josh-bagwell Jun 17, 2026
0804649
chore: Updated PrimaryButton and spec for colorSpace
josh-bagwell Jun 17, 2026
1ceb6c5
chore: Updated spec for colorSpace
josh-bagwell Jun 17, 2026
8ce9f3a
Merge branch 'prerelease/major' of github.com:Workday/canvas-kit into…
josh-bagwell Jun 23, 2026
b90361c
chore: Updated styles for buttons
josh-bagwell Jun 23, 2026
0263d37
chore: Updated minWidth for sizes
josh-bagwell Jun 23, 2026
1a112ed
chore: Updated and removed certain token overrides
josh-bagwell Jun 23, 2026
5e31eaf
Merge branch 'prerelease/major' of github.com:Workday/canvas-kit into…
josh-bagwell Jun 24, 2026
73d8ea9
Merge branch 'prerelease/major' into feat/update-buttons-sana-canvas-…
josh-bagwell Jun 24, 2026
8f97f16
chore: Removed temp styles
josh-bagwell Jun 24, 2026
dedcd78
Merge branch 'feat/update-buttons-sana-canvas-26-06' of github.com:jo…
josh-bagwell Jun 24, 2026
17dfcc6
chore: Updated colorSpace utility
josh-bagwell Jun 24, 2026
42f0d91
chore: Updated colorSpace spec
josh-bagwell Jun 24, 2026
0dba637
chore: Updated colorSpace spec
josh-bagwell Jun 24, 2026
26eca6c
chore: Updated spec
josh-bagwell Jun 25, 2026
b247cf7
chore: Nit fixes
josh-bagwell Jun 25, 2026
a855ed8
chore: Updated Upgrade Guide
josh-bagwell Jun 25, 2026
99a9809
chore: Made commit for md file
josh-bagwell Jun 25, 2026
ae98f90
chore: Added alpha tokens
josh-bagwell Jun 25, 2026
6819b6a
chore: Updated from suggestions
josh-bagwell Jun 26, 2026
e62504e
chore: Updated tokens package
josh-bagwell Jun 29, 2026
e9b2d08
chore: Pulled latest
josh-bagwell Jun 29, 2026
460da78
chore: Updated Upgrade Guide
josh-bagwell Jun 29, 2026
799715c
chore: Updated llm file
josh-bagwell Jun 29, 2026
e32564c
chore: Re-added sana variable css file
josh-bagwell Jun 29, 2026
1bab837
chore: Updated token package
josh-bagwell Jun 29, 2026
31b2116
chore: Updated colorSpace and spec
josh-bagwell Jun 29, 2026
a73ea73
chore: Updated spec
josh-bagwell Jun 29, 2026
bb73fdd
chore: Updated Delete variant to be Outline
josh-bagwell Jun 30, 2026
cbe66be
chore: Updated Upgrade Guide
josh-bagwell Jun 30, 2026
a6d2eba
chore: Updated LLM Upgrade Guide
josh-bagwell Jun 30, 2026
4484497
Merge branch 'prerelease/major' of github.com:Workday/canvas-kit into…
josh-bagwell Jun 30, 2026
45fae77
Merge branch 'prerelease/major' into feat/update-buttons-sana-canvas-…
josh-bagwell Jun 30, 2026
23a1649
Merge branch 'feat/update-buttons-sana-canvas-26-06' of github.com:jo…
josh-bagwell Jun 30, 2026
67f2c15
chore: Updated PrimaryButton
josh-bagwell Jul 1, 2026
692a2dc
Merge branch 'prerelease/major' of github.com:Workday/canvas-kit into…
josh-bagwell Jul 1, 2026
368831b
chore: Updated SegmentedControl
josh-bagwell Jul 1, 2026
2ea1965
chore: Updated Upgrade Guide
josh-bagwell Jul 1, 2026
48848b3
Updated llm Upgrade Guide
josh-bagwell Jul 1, 2026
c958358
chore: Updated DeleteButton
josh-bagwell Jul 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
334 changes: 334 additions & 0 deletions modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,334 @@
# Canvas Kit 16.0 Upgrade Guide

This guide contains an overview of the changes in Canvas Kit v16. Please
[reach out](https://github.com/Workday/canvas-kit/issues/new?labels=bug&template=bug.md) if you have
any questions.

## Why You Should Upgrade

Soon to be...

Comment on lines +7 to +10

@coderabbitai coderabbitai Bot Jun 25, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the placeholder copy before publishing.

Soon to be... and [Content will be added] read like unfinished template text in a public upgrade guide.

Also applies to: 83-86

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md` around lines 7 - 10,
Remove the unfinished placeholder text from the upgrade guide before publishing.
Update the sections containing the “Why You Should Upgrade” copy and the other
referenced placeholder block so they contain real upgrade guidance instead of
“Soon to be...” or “[Content will be added]”. Use the existing section titles in
the markdown file to locate and replace the template content with final prose.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep it for now

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RayRedGoose Understood — okay to leave it as-is for this PR. If you'd like, I can open a small follow-up issue to replace the placeholder upgrade-guide copy before release.

(◕x◕)

## Table of Contents

- [Codemod](#codemod)
- [Instructions](#instructions)
- [New Components](#new-components)
- [KBD](#kbd)
- [Component Updates](#component-updates)
- [Buttons](#buttons)
- [Delete Button Outline Variant](#delete-button-outline-variant)
- [Card](#card)
- [New Utilities](#new-utilities)
- [cornerShapeStencil](#cornershapestencil)
- [Deprecations](#deprecations)
- [Glossary](#glossary)
- [Main](#main)
- [Preview](#preview)
- [Labs](#labs)

## Codemod

We've provided a [codemod](https://github.com/Workday/canvas-kit/tree/master/modules/codemod) to
automatically update your code to work with most of the breaking changes in v16. **Breaking changes
handled by the codemod are marked with 🤖 in the Upgrade Guide.**

A codemod is a script that makes programmatic transformations on your codebase by traversing the
AST, identifying patterns, and making prescribed changes. This greatly decreases opportunities for
error and reduces the number of manual updates, which allows you to focus on changes that need your
attention. **We highly recommend you use the codemod for these reasons.**

If you're new to running codemods or if it's been a minute since you've used one, there are a few
things you'll want to keep in mind.

- Our codemods are meant to be run sequentially. For example, if you're using v14 of Canvas Kit,
you'll need to run the v15 codemod before you run v16.
- The codemod will update your code to be compatible with the specified version, but it will **not**
remove outdated dependencies or upgrade dependencies to the latest version. You'll need to upgrade
dependencies on your own.
- We recommend upgrading dependencies before running the codemod.
- Always review your `package.json` files to make sure your dependency versions look correct.
- The codemod will not handle every breaking change in v16. You will likely need to make some manual
changes to be compatible. Use our Upgrade Guide as a checklist.
- Codemods are not bulletproof.
- Conduct a thorough PR and QA review of all changes to ensure no regressions were introduced.
- As a safety precaution, we recommend committing the changes from the codemod as a single
isolated commit (separate from other changes) so you can roll back more easily if necessary.

We're here to help! Automatic changes to your codebase can feel scary. You can always reach out to
our team. We'd be very happy to walk you through the process to set you up for success.

### Instructions

The easiest way to run our codemod is to use `npx` in your terminal.```sh
npx @workday/canvas-kit-codemod v16 [path]
```
Comment thread
coderabbitai[bot] marked this conversation as resolved.

Be sure to provide specific directories that need to be updated via the `[path]` argument. This
decreases the amount of AST the codemod needs to traverse and reduces the chances of the script
having an error. For example, if your source code lives in `src/`, use `src/` as your `[path]`. Or,
if you have a monorepo with three packages using Canvas Kit, provide those specific packages as your
`[path]`.

Alternatively, if you're unable to run the codemod successfully using `npx`, you can install the
codemod package as a dev dependency, run it with `yarn`, and then remove the package after you're
finished.

```sh
yarn add @workday/canvas-kit-codemod --dev
yarn canvas-kit-codemod v16 [path]
yarn remove @workday/canvas-kit-codemod
```

> **Note:** The codemod only works on `.js`, `.jsx`, `.ts`, and `.tsx` files. You'll need to
> manually edit other file types (`.json`, `.mdx`, `.md`, etc.). You may need to run your linter
> after executing the codemod, as its resulting formatting (spacing, quotes, etc.) may not match
> your project conventions.

## New Components

### KBD

**PR:** [#4001](https://github.com/Workday/canvas-kit/pull/4001)

The new `KBD` component allows you to display keyboard inputs in your UI using accessible, visually
consistent keyboard key representations. This is useful for documenting keyboard shortcuts,
instructional prompts, or any UI patterns that reference specific keys.

**Highlights:**

- Provides a semantic (`kbd` element) way to visually present keyboard keys and shortcuts to users.
- Supports various variants (`default` for prominence, `plain` for use on colored surfaces), as well
as size options (`small`, `medium`, `large`).
- Easy to use nested `KBD.Item` components for sequences or combinations.
- RTL support.

**Example:**

```tsx
import {KBD} from '@workday/canvas-kit-labs-react';

<KBD>
<KBD.Item aria-label="Command">⌘</KBD.Item>
<KBD.Item>C</KBD.Item>
</KBD>;
```

For more details and advanced usage, including accessibility guidance for symbolic keys and
functional shortcuts, refer to the storybook documentation and our example stories.

## Component Updates

> **Note:** All visual updates apply to both the Default Canvas theme and new Sana Canvas theme
> unless specified otherwise.

### Color Input

**PR:** [#3992](https://github.com/Workday/canvas-kit/pull/3992)

#### Visual Updates

- Shape is now **12px** (previously 8px).

### Color Picker

**PR:** [#3992](https://github.com/Workday/canvas-kit/pull/3992)

#### Visual Updates

- **Sana Canvas:** swatch shape is now **6px** (previously **4px**).

### Form Field

**PR:** [#3992](https://github.com/Workday/canvas-kit/pull/3992)

#### Visual Updates

- Shape for grouped inputs (Radio groups and Checkbox groups) is now **12px** (previously 8px). As
in v15, this shape is primarily visible for error and caution states.
- Error and caution states no longer display a status background color; only the standard background
is shown.

### Text Area

**PR:** [#3992](https://github.com/Workday/canvas-kit/pull/3992)

#### Visual Updates

- Shape is now **12px** (previously 8px).
- Error and caution states no longer display a status background color; only the standard background
is shown.

### Text Input

**PR:** [#3992](https://github.com/Workday/canvas-kit/pull/3992)

#### Visual Updates

- Shape is now **12px** (previously 8px).
- Error and caution states no longer display a status background color; only the standard background
is shown.

### Card

**PR:** [#4014](https://github.com/Workday/canvas-kit/pull/4014)

#### Visual Updates

- `Card.Heading` now defaults to `body.small` type level (previously `body.large`). If your design
requires a larger heading, you can override the `typeLevel` prop on `Card.Heading`.
- The gap between `Card.Heading` and `Card.Body` has been reduced (previously `gap.lg`, now
`padding.sm`).
- Card's border radius is now managed via the new `cornerShapeStencil` (see
[New Utilities](#new-utilities)).

### Buttons

**PR:** [#4000](https://github.com/Workday/canvas-kit/pull/4000)

All buttons have had the following updates:

- `fontWeight` has been updated from `system.fontWeight.bold` to `system.fontWeight.medium`.
- `minWidth` has been updated to the following:

| Default Size | minWidth v15 | minWidth v16 |
| ------------ | ------------ | ------------ |
| extraSmall | unchanged | unchanged |
| small | `5rem` | `4.5rem` |
| medium | `6rem` | `5.5rem` |
| large | `7rem` | `6.5rem` |

- `paddingInline` has been updated to the following:

| Size | paddingInline v15 | paddingInline v16 |
| ---------- | ----------------- | ----------------- |
| extraSmall | `0.75rem` | `0.5rem` |
| small | `1rem` | `0.75rem` |
| medium | `1.5rem` | `1rem` |
| large | `2rem` | `1.25rem` |

#### Delete Button Outline Variant

We've added an `outline` variant to the `DeleteButton` component. This variant will reverse the
button's styling with a `border` and `transparent` background.

```tsx
import {DeleteButton} from '@workday/canvas-kit-react/button';

<DeleteButton variant="outline">Delete</DeleteButton>;
```

## New Utilities

### cornerShapeStencil

We've added a new stencil called `cornerShapeStencil` to `@workday/canvas-kit-react/common`. It
applies the CSS [`corner-shape`](https://developer.mozilla.org/en-US/docs/Web/CSS/corner-shape)
property as a progressive enhancement for components using border radius that aren't circular.
Browsers that don't support `corner-shape` fall back to `border-radius` alone, as border-radius is
declared first in the cascade.

The stencil exposes a `shape` variable for setting the border radius. Extend it in your own stencils
to get consistent rounded corners:

```tsx
import {cornerShapeStencil} from '@workday/canvas-kit-react/common';
import {createStencil} from '@workday/canvas-kit-styling';
import {system} from '@workday/canvas-tokens-web';

export const myStencil = createStencil({
extends: cornerShapeStencil,
base: {
[cornerShapeStencil.vars.shape]: system.legacy.shape.xxl,
},
});
```

`Card` extends this stencil for its rounded corners.

## Deprecations

We add the [@deprecated](https://jsdoc.app/tags-deprecated.html) JSDoc tag to code we plan to remove
in a future major release. This signals consumers to migrate to a more stable alternative before the
deprecated code is removed.

## Glossary

For an overview of the different packages we provide, please view our docs
[here](https://workday.github.io/canvas-kit/?path=/docs/guides-packages--docs).

### Main

Components in the Main package are stable and ready for production use.

### Preview

Components in the Preview package are mostly stable but may still receive breaking changes before
being promoted to Main.

### Labs

Components in the Labs package are experimental and may receive significant changes or be removed
entirely.

---

## Codemod Reference

# What is a Codemod?

A codemod is a script that makes programmatic transformations on your codebase by traversing the
[AST](https://www.codeshiftcommunity.com/docs/understanding-asts), identifying patterns, and making
prescribed changes. This greatly decreases opportunities for error and reduces the number of manual
updates, which allows you to focus on changes that need your attention. **We highly recommend you
use the codemod for these reasons.**

If you're new to running codemods or if it's been a minute since you've used one, there are a few
things you'll want to keep in mind.

- Our codemods are meant to be run sequentially. For example, if you're using v8 of Canvas Kit,
you'll need to run the v9 codemod before you run v10 and so on.
- The codemod will update your code to be compatible with the specified version, but it will **not**
remove outdated dependencies or upgrade dependencies to the latest version. You'll need to upgrade
dependencies on your own.
- We recommend upgrading dependencies before running the codemod.
- Always review your `package.json` files to make sure your dependency versions look correct.
- The codemod will not handle every breaking change in this upgrade. You will likely need to make some manual
changes to be compatible. Use our Upgrade Guide as a checklist.
- Codemods are not bulletproof.
- Conduct a thorough PR and QA review of all changes to ensure no regressions were introduced.
- As a safety precaution, we recommend committing the changes from the codemod as a single
isolated commit (separate from other changes) so you can roll back more easily if necessary.

We're here to help! Automatic changes to your codebase can feel scary. You can always reach out to
our team. We'd be very happy to walk you through the process to set you up for success.

## Running a Codemod

### Instructions

The easiest way to run our codemod is to use `npx` in your terminal.```sh
npx @workday/canvas-kit-codemod v${canvasKitMajorVersionNumber} [path]
```

Be sure to provide specific directories that need to be updated via the `[path]` argument. This
decreases the amount of AST the codemod needs to traverse and reduces the chances of the script
having an error. For example, if your source code lives in `src/`, use `src/` as your `[path]`. Or,
if you have a monorepo with three packages using Canvas Kit, provide those specific packages as your
`[path]`.

Alternatively, if you're unable to run the codemod successfully using `npx`, you can install the
codemod package as a dev dependency, run it with `yarn`, and then remove the package after you're
finished.

```sh
yarn add @workday/canvas-kit-codemod --dev
yarn canvas-kit-codemod v${canvasKitMajorVersionNumber} [path]
yarn remove @workday/canvas-kit-codemod
```

> **Note**: The codemod only works on `.js`, `.jsx`, `.ts`, and `.tsx` files. You'll need to
> manually edit other file types (`.json`, `.mdx`, `.md`, etc.). You may need to run your linter
> after executing the codemod, as its resulting formatting (spacing, quotes, etc.) may not match
> your project conventions.

No codemod transformations available for v16.
Comment on lines +275 to +334

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Replace the stale v16 codemod note.

The reference section says there are no codemod transformations for v16, which contradicts the earlier codemod guidance and leaves readers without the migration path for the breaking button API changes.

🧰 Tools
🪛 LanguageTool

[style] ~179-~179: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...change in this upgrade. You will likely need to make some manual changes to be compat...

(REP_NEED_TO_VB)


[style] ~187-~187: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...n always reach out to our team. We'd be very happy to walk you through the process to set ...

(EN_WEAK_ADJECTIVE)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md` around lines 159 -
218, The Codemod Reference section still says there are no v16 transformations,
which is stale and conflicts with the upgrade guidance. Update the content in
the Codemod Reference/Running a Codemod area to point readers to the actual v16
migration codemod for the breaking button API changes, and remove the
unsupported “No codemod transformations available for v16” note. Keep the
instructions aligned with the existing `canvasKitMajorVersionNumber` codemod
examples so users know how to run the correct v16 migration path.

38 changes: 38 additions & 0 deletions modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Soon to be...
- [New Components](#new-components)
- [KBD](#kbd)
- [Component Updates](#component-updates)
- [Buttons](#buttons)
- [Delete Button Outline Variant](#delete-button-outline-variant)
- [Card](#card)
- [New Utilities](#new-utilities)
- [cornerShapeStencil](#cornershapestencil)
Expand Down Expand Up @@ -185,6 +187,42 @@ functional shortcuts, refer to the storybook documentation and our example stori
- Card's border radius is now managed via the new `cornerShapeStencil` (see
[New Utilities](#new-utilities)).

### Buttons

**PR:** [#4000](https://github.com/Workday/canvas-kit/pull/4000)

All buttons have had the following updates:

- `fontWeight` has been updated from `system.fontWeight.bold` to `system.fontWeight.medium`.
- `minWidth` has been updated to the following:

| Default Size | minWidth v15 | minWidth v16 |
| ------------ | ------------ | ------------ |
| extraSmall | unchanged | unchanged |
| small | `5rem` | `4.5rem` |
| medium | `6rem` | `5.5rem` |
| large | `7rem` | `6.5rem` |

- `paddingInline` has been updated to the following:

| Size | paddingInline v15 | paddingInline v16 |
| ---------- | ----------------- | ----------------- |
| extraSmall | `0.75rem` | `0.5rem` |
| small | `1rem` | `0.75rem` |
| medium | `1.5rem` | `1rem` |
| large | `2rem` | `1.25rem` |

#### Delete Button Outline Variant

We've added an `outline` variant to the `DeleteButton` component. This variant will reverse the
button's styling with a `border` and `transparent` background.

```tsx
import {DeleteButton} from '@workday/canvas-kit-react/button';

<DeleteButton variant="outline">Delete</DeleteButton>;
```

## New Utilities

### cornerShapeStencil
Expand Down
2 changes: 1 addition & 1 deletion modules/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@workday/canvas-kit-react": "^15.0.14",
"@workday/canvas-kit-styling": "^15.0.14",
"@workday/canvas-system-icons-web": "4.0.4",
"@workday/canvas-tokens-web": "4.4.0-beta.0",
"@workday/canvas-tokens-web": "4.4.0-beta.3",
"markdown-to-jsx": "^7.2.0",
"react-syntax-highlighter": "^15.5.0",
"ts-node": "^10.9.1"
Expand Down
Loading
Loading