Skip to content

feat(react-headless-components-preview): add Toolbar component#35992

Draft
dmytrokirpa wants to merge 3 commits intomicrosoft:masterfrom
dmytrokirpa:base/toolbar
Draft

feat(react-headless-components-preview): add Toolbar component#35992
dmytrokirpa wants to merge 3 commits intomicrosoft:masterfrom
dmytrokirpa:base/toolbar

Conversation

@dmytrokirpa
Copy link
Copy Markdown
Contributor

@dmytrokirpa dmytrokirpa commented Apr 15, 2026

This pull request introduces a new headless Toolbar component suite to the @fluentui/react-headless-components-preview package. It adds the core Toolbar component and related subcomponents (such as ToolbarButton, ToolbarDivider, ToolbarGroup, and ToolbarRadioGroup), along with their hooks, types, and renderers. These components are built on top of the primitives from @fluentui/react-toolbar, exposing a headless API for advanced composition and styling. The PR also adds tests and updates package dependencies.

New Toolbar suite integration:

  • Added Toolbar, ToolbarButton, ToolbarDivider, ToolbarGroup, and ToolbarRadioGroup components, each with corresponding hooks (useToolbar, useToolbarButton, etc.), types, and render functions, providing a headless API for building toolbars. [1] [2] [3] [4] [5]
  • Extended the public API and type definitions to include all new Toolbar-related components, props, states, slots, and context values, ensuring they are documented and available for consumers. [1] [2] [3] [4]
  • Integrated the new @fluentui/react-toolbar dependency to provide base implementations for the Toolbar primitives.

Component implementation details:

  • Each Toolbar subcomponent sets appropriate data attributes (e.g., data-vertical, data-disabled, data-icon-only) on the root element to facilitate styling and state indication. [1] [2] [3] [4] [5]
  • Render functions for Toolbar subcomponents delegate rendering to the corresponding base component renderers from Fluent UI (e.g., renderButton_unstable, renderDivider_unstable). [1] [2]

Testing:

  • Added conformance and rendering tests for the Toolbar component to ensure correct behavior and accessibility attributes.

This update enables advanced headless composition of toolbars and related controls using Fluent UI primitives in the preview package.

@dmytrokirpa dmytrokirpa requested review from a team as code owners April 15, 2026 13:53
@dmytrokirpa dmytrokirpa marked this pull request as draft April 15, 2026 13:53
@dmytrokirpa dmytrokirpa self-assigned this Apr 15, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 15, 2026

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-headless-components-preview
react-headless-components-preview: entire library
64.854 kB
19.302 kB
68.835 kB
20.176 kB
3.981 kB
874 B

🤖 This report was generated against c93849cf045adf92b80a2a4fa8efc615f94f9a86

@github-actions
Copy link
Copy Markdown

Pull request demo site: URL

@@ -0,0 +1,7 @@
{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/Avatar Converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Avatar Converged.badgeMask.normal.chromium.png 1 Changed
vr-tests-react-components/Charts-DonutChart 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Charts-DonutChart.Dynamic - RTL.default.chromium.png 5570 Changed
vr-tests-react-components/Charts-DonutChart.Dynamic.default.chromium.png 5581 Changed
vr-tests-react-components/Menu 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu.Nested Submenus Small Viewport Stacked.nested menu.chromium.png 353 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png 413 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default - RTL.submenus open.chromium.png 404 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 510 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 503 Changed
vr-tests-react-components/ProgressBar converged 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png 56 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png 235 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png 27 Changed
vr-tests-web-components/Accordion 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/Accordion. - Dark Mode.normal.chromium_1.png 3154 Changed
vr-tests-web-components/Badge 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/Badge. - Dark Mode.normal.chromium.png 443 Changed
vr-tests-web-components/MenuList 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/MenuList. - RTL.1st selected.chromium_2.png 39384 Changed
vr-tests-web-components/MenuList. - RTL.2nd selected.chromium.png 17 Changed
vr-tests-web-components/MenuList. - RTL.2nd selected.chromium_3.png 38816 Changed
vr-tests/Callout 13 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/Callout.Bottom right edge.default.chromium.png 1130 Changed
vr-tests/Callout.Beak 25.default.chromium.png 2198 Changed
vr-tests/Callout.Gap space 25.default.chromium.png 2195 Changed
vr-tests/Callout.Bottom right edge - RTL.default.chromium.png 1124 Changed
vr-tests/Callout.Bottom left edge - RTL.default.chromium.png 2199 Changed
vr-tests/Callout.Left center.default.chromium.png 2584 Changed
vr-tests/Callout.No callout width specified.default.chromium.png 2143 Changed
vr-tests/Callout.Right bottom edge.default.chromium.png 3095 Changed
vr-tests/Callout.Left bottom edge.default.chromium.png 3182 Changed
vr-tests/Callout.Root.default.chromium.png 2195 Changed
vr-tests/Callout.Top center.default.chromium.png 2127 Changed
vr-tests/Callout.Right center.default.chromium.png 2117 Changed
vr-tests/Callout.Top right edge.default.chromium.png 1146 Changed
vr-tests/Keytip 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/Keytip.Disabled.default.chromium.png 26 Changed
vr-tests/react-charting-AreaChart 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/react-charting-AreaChart.Custom Accessibility.default.chromium.png 11 Changed
vr-tests/react-charting-LineChart 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/react-charting-LineChart.Events - Dark Mode.default.chromium.png 16 Changed
vr-tests/react-charting-LineChart.Events.default.chromium.png 1 Changed
vr-tests/react-charting-MultiStackBarChart 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/react-charting-MultiStackBarChart.Basic_Absolute.default.chromium.png 359 Changed
vr-tests/react-charting-MultiStackBarChart.Basic_PartToWhole - Dark Mode.default.chromium.png 363 Changed
vr-tests/react-charting-MultiStackBarChart.Basic_Absolute - RTL.default.chromium.png 343 Changed
vr-tests/react-charting-VerticalBarChart 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/react-charting-VerticalBarChart.Grouped - Wrap Labels - RTL.default.chromium.png 3106 Changed

There were 2 duplicate changes discarded. Check the build logs for more information.

@dmytrokirpa dmytrokirpa force-pushed the base/toolbar branch 2 times, most recently from 1c8e908 to 45a3998 Compare April 16, 2026 15:36
@dmytrokirpa
Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant