Repository navigation
The first minor after the 1.0 freeze: it closes the Fluent UI v9 gap backlog of docs/ROADMAP.md (§8.2, §8.5 and §8.6) that the freeze allowed, and adds nothing breaking. Every addition is optional and defaults to the 1.0 behaviour, with the few exceptions under "Upgrading from 1.0". What stays open, and why, is in the roadmap's §8.1a.
Upgrading from 1.0
Nothing needs to change. Three kinds of difference can show in code or markup that depends on exact details:
- Widened unions.
PresenceStatusgains'blocked'and'unknown',TimePickerInvalidReasongains'not-listed',SpinnerSizegains three sizes,ToastPositiongains'top'and'bottom',DismissReasonandModalOpenChangeReasongain'parent-closed'/'focus-outside', andToastControllerhas three more members (updateToast,pauseToast,playToast). An exhaustiveswitchover one of these unions, or code that implementsToastControlleritself, needs the new cases. - Markup.
MenuButtonalways rendersaria-expanded;RadioGroup.Itemrendersdata-label-positionandSliderrendersdata-orientation; a bareSkeletonis 16px tall;ToggleButtonas an anchor with anhrefand noroleno longer rendersaria-pressed; a popup with the default motion isdata-presence="exited"until it is placed; a Popover, Menu or other popup opened inside a Dialog or Drawer closes with it. Literal markup pins in your own tests may need a refresh. - Migration codemod.
chart-1tochart-5are names a stock shadcn/ui theme also defines, so the codemod now treats 22 names as shared (the 17 of 1.0 and these five).
Added
- Text takes Fluent's layout and decoration props:
wrap,truncate,italic,underline,strikethrough,alignandblock(closestext-1,text-2andtext-5). - Divider takes
appearance(default,subtle,strong,brand),insetandalignContent(start,center,end), withdata-appearance,data-insetand, on a labelled divider,data-align-content(closesdivider-1,divider-2anddivider-3).DividerAppearanceis a new exported type. - Badge takes the
ghostappearance (the color as text alone),shape(circular,rounded,square), thetinysize (a 6px dot with no content), and aniconslot withiconPosition(before,after), withdata-shapeanddata-sizeand the stable classwave-badge__icon(closesbadge-3,badge-4,badge-5andbadge-6).BadgeAppearancegains'ghost', andBadgeSize('tiny'andSize) is a new exported type. - CounterBadge takes the
ghostappearance,shapeandsize(extra-smalltoextra-large; adotstays 6px), withdata-shapeanddata-size(closescounterbadge-4). - PresenceBadge takes the statuses
blockedandunknown(each with a glyph of its own) and theoutOfOfficemodifier, which draws the out-of-office arrow in the status's color and names the badge ", out of office" (closespresence-1andpresence-2).PresenceStatusgains'blocked'and'unknown', so aswitchover it that has nodefaultneeds the two cases.presence-4is not changed: see the roadmap. - Buttons:
shape(rounded,circular,square; defaultrounded) on Button, ToggleButton, MenuButton, CompoundButton and SplitButton and the Toolbar buttons, withdata-shapewhile it is set (closesbuttons-1). ToggleButton and MenuButton are polymorphic (as), with the new typesToggleButtonOwnPropsandMenuButtonOwnProps(closesbuttons-11).CompoundButton'ssecondaryTexttakes a slot object and the newcontentContainerslot object re-elements the text column; both merge overslotProps(closesbuttons-7).SplitButtonmenuButtonLabel={null}names the menu half by the primary action througharia-labelledby(closesbuttons-14).Linktakesbackground(default,brand,inverted; new typeLinkBackground) withdata-background(closesbuttons-18). - Textarea takes
resize(none,vertical,horizontal,both; defaultvertical; typeTextareaResize) andonValueChange(value)(closesform-basic-13andform-basic-15). - Select takes
icon(a custom chevron drawn in awave-select__wrapperbeside the select;falsehides the chevron; new classeswave-select__wrapperandwave-select__icon) andonValueChange(value), which withmultiplegets the first selected value (closesform-basic-27andform-basic-28). - RadioGroup and
RadioGroup.ItemtakelabelPosition(after,below; typeRadioLabelPosition);orientation="horizontal"withlabelPosition="below"is Fluent'shorizontal-stacked(closesform-basic-20). - Slider takes
orientation="vertical"(closesform-basic-30). - TimePicker takes
showSeconds(valueHH:mm:ss),formatTime(value),parseTime(text)andfreeform(falselimits the selection to listed times and reports others as the new'not-listed'reason ofTimePickerInvalidReason, with the messagelabels.notListed), closingtimepicker-2,timepicker-4andtimepicker-5. AswitchoverTimePickerInvalidReasonthat has nodefaultneeds the new case. - Table and DataGrid take
size('medium','small'or'extra-small'; typeTableSize): it tightens the padding of cells, header cells, sort buttons and selection cells and sizes the media ofTable.CellLayout, rendered asdata-size(closestable-1).Table.Rowtakesappearance('none','brand'or'neutral'; typeTableRowAppearance), the fill of a selected DataGrid row for a row of your own state, rendered asdata-appearance(closestr-1). - DataGrid takes
focusMode('cell','row'or'none'; typeDataGridFocusMode; Fluent'srow_unstableis'row', its'composite'has no counterpart), anduseGridNavigationtakes the same option (GridNavigationFocusMode), rendered asdata-focus-mode(closesdg-4, except'composite').DataGrid.CellandDataGrid.HeaderCelltakefocusMode('cell','group'or'none'; typeDataGridCellFocusMode):'none'takes the cell and its widgets out of the arrow-key navigation,'group'makes the cell its own focus target (closesdgc-1). - Table takes
virtualWindowandTable.Bodytakescountwith a function child that returns the row at an index: only the rows in view render, between spacer rows (new classwave-table__spacer), witharia-rowcount,aria-rowindexanddata-row-index.GridNavigationModeltakes an optionalfooterRowCount. - Dialog:
Dialog.Content mountNode,titleAsandDialog.Title as(a heading level,divorspan; typeDialogTitleElement),Dialog.Footer position,startActions,fluidandstackOnNarrow, andlightDismisson a non-modal Dialog and Drawer (a press outside or focus leaving closes it, with the reasonsoutside-pressandfocus-outside) (closesdialog-6,dialogtitle-1,dialogactions-1,dialogactions-2). - Popover:
onOpenChange(open, details?)withreasonandevent(typesPopoverOpenChangeReason,PopoverOpenChangeDetails),withArrow,trapFocus,inline,closeOnScroll,appearance(neutral,brand,inverted),size, andPopover.Content role(closespopover-4,popover-5,popover-6,popoversurface-1,popoversurface-2,popoversurface-4). - Tooltip:
relationship="inaccessible",withArrowwithslotProps.beak,positioning.target, andasChild(no wrapper element) (closestooltip-2,tooltip-4,tooltip-5,tooltip-7;tooltip-6is covered byslotProps.content). TeachingPopover:appearanceandtrapFocus(closesteaching-2,teaching-4;teaching-3is covered bypositioning). - Menu:
onOpenChange(open, details?)reportsdetails.reasonand the DOMevent(typesMenuOpenChangeReason,MenuOpenChangeDetails),closeOnScroll,inlineandmountNode(both inherited by submenus), andidonMenu.Popover, which the trigger'saria-controlsfollows (closesmenu-4andmenu-5). Menu items takesubText(a second line that is part of the name;slotProps.subText),secondaryContentanddisabledFocusable(closesmenu-7,menu-8,menu-9). A touch or pen long press (600 ms) opens anopenOnContextmenu in browsers that fire nocontextmenu(iOS Safari). - Nav and NavDrawer take
density="small"(data-density),multiple={false}(one open category) anddetailsononValueChange,onItemSelectandonOpenCategoriesChange(typesNavDensity,NavSelectDetails,NavCategoryToggleDetails) (closesnav-1,nav-2,nav-4).useNavDrawerTogglewires a Hamburger outside a NavDrawer. chartSeriesand the tokens--wave-chart-1to--wave-chart-10(chart1tochart10,bg-wave-chart-N): ten categorical colors made for charts, 3:1 onbackgroundandcardand at least 7 apart (OKLab dE x100) for full color vision and under simulated protanopia, deuteranopia and tritanopia, tested as a set in light and dark; white in high contrast.chartPaletteis unchanged.motionon the listbox popups of Combobox, Dropdown, TagPicker and TimePicker (andListboxSurface), on the DatePicker calendar, and on AvatarGroup andAvatarGroup.Popover: these popups fade and slide like Popover (popupMotion), and the listbox stays in its popup while it exits.useVirtualWindowtakesmeasureItems: rows of different heights, withitemSizeas the estimate; rows are measured, and the scroll position is corrected when a measured size differs.VirtualWindow.itemProps?(index)and the typeVirtualItemPropsare new. List, Listbox, Combobox and Dropdown lay out from it; DataGrid and FlatTree keep fixed rows.virtualWindowon TimePicker and TagPicker (array form), with the classeswave-time-picker__spacerandwave-tag-picker__spacer. List takesgetItemLabel(index), typeahead over every item of a windowed list.- Listbox (multi-select) takes range keys: Shift+Arrow, Shift+Space, Ctrl+Shift+Home/End and Ctrl/Cmd+A, with
useListboxonSelectRange, the typeListboxRangeDetailsandlabels.rangeAddedandlabels.rangeRemoved. - Tag and InteractionTag take
disabledFocusable,InteractionTag.Primaryis polymorphic (typeInteractionTagPrimaryOwnProps), and TagGroup takesselectionMode="single"and wires into a Field (label, hint, message, required). - TagPicker takes
noPopover,secondaryAction(root andTagPicker.Control, classwave-tag-picker__secondary-action),disabledonoptionsentries, andonOptionCreate(text, details?)(typeTagPickerCreateDetails). - Spinner takes
labelPosition, the sizesextra-tiny,tinyandhuge(typeSpinnerSize) and a ReactNodelabel;SpinnerContextProvidergives a defaultsize. ProgressBar takesthicknessandshape. Skeleton takessizepresets,animation="wave"andappearance="translucent", andSkeleton.Groupcarries the same defaults (closesspinner-3tospinner-5,progress-3,progress-4,skeleton-1toskeleton-3,skeletonitem-1). - MessageBar takes
shapeandpoliteness. Toast takesappearance="inverted"andshowDismissButton. Toaster takesoffset, the centered positionstopandbottom,inlineandannounce; dispatch options takeposition,politeness,priority,pauseOnHover,pauseOnWindowBlur,appearance,showDismissButtonandonStatusChange; the controller gainsupdateToast,pauseToastandplayToast, also oncreateToasterhandles (closesmessagebar-4,messagebar-5,toast-4,toaster-3,toaster-4,toaster-6totoaster-9,toastctl-2totoastctl-4). announce()anduseAnnouncetake an options object withbatchId,priority,deferWhileTypingandariaNotify(closesannounce-1,foundation-30,foundation-31,foundation-32).WaveProvider classNames: app-wide classes by root class ('wave-button': 'rounded-full'), composed after a component's own classes and before itsclassName. They merge key by key through nested providers (''removes one,nullclears all) and reach portaled overlays. Closes the deferred half offoundation-38(the Phase 13 ruling R17).- The built-in glyphs are exported (28
*Iconcomponents,IconProps,IconComponent), each withflipInRtl, andflipIconInRtl(icon)mirrors an icon of your own in right-to-left layouts (closesfoundation-42,foundation-44; theGuides/Iconsstory lists them). - Hooks
useTimeout,useAnimationFrame,useScrollbarWidth,useApplyScrollbarWidth,useObservedElementanduseFocusObserved(closesfoundation-29,foundation-41). - Accordion takes
collapsible={false}, number item values (Accordion<V>),AccordionToggleDetailsas the optional second argument of its change callbacks,size,expandIconPosition, and a TriggerexpandIconslot,iconslot (wave-accordion-trigger__icon) andinline(closesacc-1toacc-5). - Card takes
disabled,defaultSelected,onSelectionChange(selected, { event }), an optionaleventononSelect, andfocusMode(closescard-4tocard-6). TabList takesdisabled(closestab-4). CarouselonValueChange(index, details?)reportsCarouselChangeDetails(reason,event; closescar-5). Drawer takesmountNode(closesdrw-5). - Tree takes
size,appearance,independentChecks, range selection in a checkbox tree (Ctrl+A, Shift+Space, Shift+Arrow),Tree.Itemopen,onOpenChangeandactionsVisible, andonExpandedItemsChangereportsTreeOpenChangeDetails(closestree-3,tree-5,tree-6). FlatTree navigationMode="treegrid": real WAI-ARIA treegrid roles (treegrid,row,gridcell) witharia-level,aria-posinset,aria-setsize,aria-rowindexandaria-rowcount, and the APG keyboard (rows and cells, Enter or F2 into a cell's controls, Escape back); it works withvirtualWindow.renderCells(row)draws the further cells,slotProps.celland the classwave-flat-tree-item__cellstyle them. The nestedTreekeeps itstreeroles (itsnavigationMode="treegrid"changes the keyboard only).- Option groups in data mode:
ListboxItem.groupandrenderGroup(group, { index, size })(typeListboxGroupRenderState) on Listbox, Combobox and Dropdown draw the items of a group under a header as a namedrole="group", and avirtualWindowwindows them with their headers. Headers are no options, so the keys and typeahead skip them;useListboxonScrollToItem(index, target?)receives the window rows of an option when items have groups. Sticky headers are not supported. - NavDrawer takes
mountNode, as Drawer does.
Changed
- MenuButton always reports
aria-expanded:"false"unlessexpanded, aMenu.Triggeror your ownaria-expandedsays otherwise (closesbuttons-12). - ToggleButton rendered as an anchor with
hrefand noroleno longer rendersaria-pressed(not allowed on a link) and warns in development. - RadioGroup.Item renders
data-label-position, and Slider rendersdata-orientation, always (enumerated attributes, C-CLASS). - A Popover, Menu or other popup opened inside a Dialog or Drawer closes with it (the new reason
parent-closedofDismissReason,parentfor a Menu), also when the surface is kept mounted or still exiting. - Only one Tooltip is shown at a time; it hides while the document is hidden or its anchor is clipped, and never shows over a trigger whose popup is expanded.
- An import of only Nav no longer includes Button's modules (about 7.5 KiB minified smaller): a Button glyph is recognised by a marker.
- A surface opened from inside a hover-closing surface, with no trigger and no focused opener, closes along with it without moving focus.
- The pickers' popup surfaces, the DatePicker calendar and the AvatarGroup popup render
data-presenceanddata-state, and areinertwhile they exit. - The Guides/Charts stories use
chartSeries, ink their patterns inbackgroundand hide the chart's own markup (aria-hidden) inside therole="img"frame; the guide documents both. The declaration roll-up is built withunplugin-dtsinstead ofvite-plugin-dts(build tooling only). - An editable combobox (Combobox, TagPicker, TimePicker) clears the highlight and
aria-activedescendanton ArrowLeft, ArrowRight, Home and End, as Fluent does. - A
Skeletonwith noheightis 16px tall (it drew no box before); passheightorsizeto change it. - Toasts stay beside an overlay drawer while it slides out, and a toast's shadow stays visible while it fades out.
ToastControllerhas three more members (updateToast,pauseToast,playToast): code that implements the type itself must add them.WaveProvider tokens={null}also resets the theme-independent tokens (the ramps, font families, stacking layers, motion) that an enclosing provider overrode.- A popup with the default motion (Popover,
Menu.Popover, the InfoButton note, the TeachingPopover surface, the DatePicker calendar, the AvatarGroup popup and the picker listbox popups) carriesdata-presence="exited"for the moment before it is placed, and an open-by-default popup reachesenteringonly after floating-ui has placed it. The class string ofpopupMotiongrew by sixexitedclasses. - The development warning for
OptionGroupchildren beside avirtualWindowpoints togroupandrenderGroup. - Smaller bundles: the provider's token reset table and
useVirtualWindoware leaner (WaveProviderwithDialog-748 B minified,useVirtualWindow-728 B minified and -334 B gzip).
Fixed
- PresenceBadge no longer throws for a status that is neither a member of
PresenceStatusnor one of the removed 0.x names (a misspelled name, different casing,nullfrom server data): it draws'offline'and, in development, warns once. A throw there unmounted the whole Persona or Avatar around it. A throw from the development warning itself (a console that throws) now surfaces instead of being swallowed with the missing-processcase. useSelectionclears the details of a change in afinally, so a throw from the update or fromonSelectedItemsChangeleaves nothing for a later change to report.- The rows of a
<tfoot>in a windowed DataGrid getaria-rowindex, are counted inaria-rowcountand are reached by the arrow keys, PageUp/PageDown and Ctrl+End. - A column resize drag whose end never reaches the handle (WebKit, right to left, a table wider than its wrapper) now ends at a
pointeruporpointercancelon the document, or at the next press of the same pointer, instead of leavingdata-resizinganddata-draggingset. - A Tooltip keeps the content it showed while it fades out, and
backdropMotion={null}on a non-modal Dialog, Drawer or inline drawer no longer logs thebackdrop-ignoredwarning. createBrandTokens' ramp check andWaveProvider'stokenswarnings are no longer skipped when there is noprocessglobal (an unbundled import in a browser); production bundles still drop them.- A Dropdown opened with a mouse click is focused on pointerdown, so its keys work in WebKit. Combobox, Dropdown, DatePicker, TimePicker and SearchBox move focus to the control when the clear button disappears while focused.
- A
<Fragment ref>around a trigger child, a Tooltip target, a Presence child or anasChildOverflow.Item receives its ref. - A selection changed while the TabList line still slides starts the next slide from the line's visible box. A percentage
max-heighton an Accordion region, a Tree group or a Nav list no longer resolves against the collapsing track. The check cascade of Tree and FlatTree no longer overflows the stack on very deep trees. - A popup whose placement flips now enters sliding away from its anchor, not toward it: the surface starts its enter on the side floating-ui resolved (Popover,
Menu.Popover, the InfoButton note, the TeachingPopover surface, the DatePicker calendar, the AvatarGroup popup, and the picker listbox popups). Popups with a custommotionstring,motion={null}orWaveProvider motion="none"are unchanged. Dialog.Footer stackOnNarrowstacks the actions at a viewport of exactly 480px, as documented (Tailwind'smax-[480px]stopped at 479px).
Documentation
Input'sslotProps.rootJSDoc says that, where the root is the<input>itself, a tab stop or roving marker goes throughslotProps.input.
Size
Against 1.0.0 as published on npm, measured with this release's build tools (verify-dist's measureImport: a minified production Vite build of an entry that imports the names from dist/index.mjs, bare imports external, gzip by node:zlib; the stylesheets as built, gzip at level 9). Sizes are in bytes:
| Import | 1.0.0 | 1.1.0 | Growth |
|---|---|---|---|
dist/styles.css |
110,691 (16,555 gzip) | 123,260 (18,189 gzip) | +12,569 (+1,634 gzip) |
dist/components.css (internal) |
92,638 (13,299 gzip) | 104,544 (14,730 gzip) | +11,906 (+1,431 gzip) |
dist/utilities.css |
62,857 (6,786 gzip) | 65,869 (7,138 gzip) | +3,012 (+352 gzip) |
dist/preflight.css |
3,453 (1,272 gzip) | 3,453 (1,272 gzip) | 0 |
An import of only Button |
12,037 (4,033 gzip) | 12,425 (4,205 gzip) | +388 (+172 gzip) |
An import of only MessageBar |
30,070 (10,222 gzip) | 30,860 (10,553 gzip) | +790 (+331 gzip) |
An import of only Tree |
51,190 (17,427 gzip) | 55,392 (18,773 gzip) | +4,202 (+1,346 gzip) |
An import of only Dialog |
73,934 (24,667 gzip) | 75,973 (25,387 gzip) | +2,039 (+720 gzip) |
An import of WaveProvider and Dialog |
76,487 (25,640 gzip) | 80,310 (27,319 gzip) | +3,823 (+1,679 gzip) |
An import of only DataGrid |
72,123 (24,325 gzip) | 72,132 (24,521 gzip) | +9 (+196 gzip) |
An import of usePresence and Presence |
5,453 (2,341 gzip) | 5,648 (2,407 gzip) | +195 (+66 gzip) |
An import of only useVirtualWindow |
3,868 (1,817 gzip) | 6,933 (2,783 gzip) | +3,065 (+966 gzip) |
An import of only createBrandTokens |
3,630 (1,956 gzip) | 3,630 (1,956 gzip) | 0 |
An import of only waveTokens |
3,071 (969 gzip) | 3,142 (994 gzip) | +71 (+25 gzip) |
An import of only Table |
33,005 (11,100 gzip) | 33,949 (11,897 gzip) | +944 (+797 gzip) |
An import of only cn |
1,062 (532 gzip) | 1,062 (532 gzip) | 0 |
An import of only mergeSlotProps |
2,782 (1,344 gzip) | 2,782 (1,344 gzip) | 0 |
An import of only getNativeElementProps |
2,604 (1,214 gzip) | 2,604 (1,214 gzip) | 0 |
| The npm package | 2,415,234 (537 files) | 2,678,799 (581 files) | +263,565 |
- Every component pays for
WaveProvider classNames(about 280 bytes inButton: the context read each component makes) and the stylesheets grow with the new utilities.DataGridstays at its 1.0 size (+9 bytes) although it gained the row and cell focus modes, footer rows and the size variants. useVirtualWindowgrows by the measuring path (measureItems), which a fixed-size-only import cannot leave out;Treeby range selection, independent checks, open control and iterative cascades;Dialogby light dismiss, the title element, footer options andmountNode.- Budgets:
verify-distgates the ten imports fromButtontowaveTokensat their size measured at this release plus 512 bytes (192 gzip), and prints each against 0.18.1. Development warnings still ship in production bundles (lib/devis a function call a minifier cannot fold); gating them behind the literalprocess.env.NODE_ENVcheck would save several KB inDataGrid,DialogandTreeand is left for a later release.
Known limits
- Real-browser checks of this release ran in Chromium (the popup motion, the Table and DataGrid modes, the Toaster, Tree, Accordion, Card, Dialog, Popover, Tooltip, Menu and Nav additions, and the charts in right-to-left layouts), with the vertical Slider, the DataGrid resize drag, the Combobox popup motion and the Dialog footer also in Firefox and WebKit. Not covered: real touch devices and the Android long-press
contextmenupath, forced colors beyond the Tree row actions, the dark theme for the popup, Tree and Menu areas, the flipped enter ofMenu.Popoversubmenus, InfoButton, TeachingPopover and the picker popups in Firefox, WebKit and right-to-left layouts, and the treegrid with a screen reader. - Still open (docs/ROADMAP.md §8.1a): the arrow keys between toasts (no screen-reader pattern), real
treegridroles in the nestedTree(useFlatTree navigationMode="treegrid"), sticky headers for option groups, and TagPicker option groups;DataGrid focusMode="row"is ignored with avirtualWindow(a development warning says so), andfocusMode="composite"has no counterpart.