Search
HomeGet startedDevelopStylesComponents
Develop index

Upgrading to 3.17

Material Design 3 ExpressivePublishedUpdated

What changes from 3.16 to 3.17, and how to keep the 3.16 look.

What changes when an app moves from 3.16 to 3.17, and how to keep the 3.16 look of one component, one section or the whole page. No option or export of 3.16 is removed. 3.17.0 is a preview for now, material@next; this page follows it, checked on 3.17.0-next.6 against 3.16.17.

Keep the 3.16 look for now

One switch restores most of the earlier appearance: import the two compatibility files and set the attribute on the page, or on one section. An option given to a component wins over the switch.

For the factories:

import 'material/compat/3.16.css';
import 'material/compat/3.16';

For the web components and the React, Vue, Svelte and Solid components, the second import is another file, and it comes before the elements are defined, or rendered on the server:

import 'material/compat/3.16.css';
import 'material/compat/3.16-elements';

Then the attribute:

<html data-material-compat="3.16">

It does not restore the drawer's section header as the section's one control (Navigation drawer). On an element, caret="false" and compact-close="false" choose the 3.17 look inside it, and ripple does on a card. Remove it once each component below looks right to you.

Changed defaults

Component In 3.17 To keep 3.16: option Attribute
App bars Edge icon buttons of 48dp, 4dp from the edge; medium and large titles 16dp from the edge insetLayout: 'wide' inset-layout="wide"
Cards, clickable A press ripples ripple: false no-ripple
Lists, segmented Rows have 10dp above and below rowSpacing: 'lines' row-spacing="lines"
Lists, segmented Unselected rows are on surface tone: 'surface-container' tone="surface-container"
Select The list is on surface-container, with 4dp corners popupSurface: 'expressive' popup-surface="expressive"
Snackbar The close button is 48dp, 12dp on either side of its icon compactClose: true compact-close
Split buttons The closed chevron is offset optically, mirrored in right-to-left chevronAlignment: 'center' chevron-alignment="center"
Time pickers The dial moves with the fast spatial spring dialSpring: 'default-spatial' dial-spring="default-spatial"
Tooltips No caret, 4dp from its anchor caret: true (a 16 × 8dp caret, 8dp from its anchor) caret

Two components change through custom properties:

Component In 3.17 To keep 3.16
Tabs The container is surface, the label has the title small line height --mtrl-tabs-container-color: transparent and --mtrl-tabs-label-line-height: 1.2
Navigation drawer The selected label has weight 500 --mtrl-drawer-selected-label-weight: 700

The options, on each factory:

import {
  createAppBar, createCard, createList, createSelect, createSnackbar,
  createSplitButton, createTimePicker, createTooltip,
} from 'material';

const appBar = createAppBar({ title: 'Inbox', insetLayout: 'wide' });
const card = createCard({ clickable: true, ripple: false });
const list = createList({
  variant: 'segmented',
  items: [{ id: 'inbox', headline: 'Inbox' }],
  rowSpacing: 'lines',
  tone: 'surface-container',
});
const select = createSelect({
  label: 'Size',
  options: [{ id: 's', text: 'Small' }],
  popupSurface: 'expressive',
});
const snackbar = createSnackbar({ message: 'Archived', compactClose: true });
const splitButton = createSplitButton({ text: 'Send', chevronAlignment: 'center' });
const timePicker = createTimePicker({ dialSpring: 'default-spatial' });
const tooltip = createTooltip({ text: 'Archive', target: card.element, caret: true });

A section's header is a label, and its chevron is a button of its own with its own tab stop. The header with no destination opens and closes its section on a click or a tap; the keyboard uses the chevron. A section with selectable: true or an href is a destination, its chevron beside it.

Rows under a header without an icon line up with the top-level rows: --mtrl-drawer-section-child-indent: 12px indents them.

An app that needs the whole row to be the keyboard's control, as in 3.16, stays on 3.16: no option restores it.

Deprecated

The dialog's large size is deprecated and leaves in 4.0. medium has the same 560px cap.

New in 3.17

  • Scaffold: <m-scaffold> and createScaffold, a page's frame.
  • App bars: scrollTarget on createAppBar(), as scroll-target on the element.
  • Tabs: scrollable="false" on <m-tabs>, for fixed tabs.
  • Carousel: addSlides(slides, index?), several slides with one layout.
  • Chips: selectable: false on an input chip keeps its action and removal, without a selection.

Check your app

  1. Install material@next and build: the types name every option above.
  2. Look at each screen with a component of the tables, in light and dark.
  3. If a press on a card, a tooltip or a list row looks wrong to your users, set that option, or the switch on that section, and come back to it later.