Skip to content

feat(react-label): add useLabelBase_unstable hook#35905

Merged
dmytrokirpa merged 3 commits into
microsoft:masterfrom
dmytrokirpa:feat/react-label-base-hooks
Mar 31, 2026
Merged

feat(react-label): add useLabelBase_unstable hook#35905
dmytrokirpa merged 3 commits into
microsoft:masterfrom
dmytrokirpa:feat/react-label-base-hooks

Conversation

@dmytrokirpa

Copy link
Copy Markdown
Contributor

Summary

  • Adds LabelBaseProps type derived from LabelProps by omitting design props (size, weight)
  • Adds LabelBaseState type derived from LabelState by omitting the same design props
  • Adds useLabelBase_unstable hook that handles pure slot structure logic (root, required, disabled) without design-specific concerns
  • Refactors useLabel_unstable to call useLabelBase_unstable and spread its results, then add design props
  • Updates renderLabel_unstable to accept LabelBaseState instead of LabelState
  • Exports new types and hook from the package public index

Tracking: #35562

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Mar 25, 2026

Copy link
Copy Markdown

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-checkbox
Checkbox
33.408 kB
11.361 kB
33.458 kB
11.375 kB
50 B
14 B
react-components
react-components: entire library
1.297 MB
324.105 kB
1.297 MB
324.124 kB
50 B
19 B
react-field
Field
22.083 kB
8.337 kB
22.133 kB
8.35 kB
50 B
13 B
react-label
Label
12.904 kB
5.241 kB
12.954 kB
5.258 kB
50 B
17 B
react-list
ListItem
110.725 kB
32.622 kB
110.775 kB
32.629 kB
50 B
7 B
react-radio
Radio
31.036 kB
9.638 kB
31.087 kB
9.656 kB
51 B
18 B
react-spinner
Spinner
23.539 kB
7.815 kB
23.596 kB
7.838 kB
57 B
23 B
react-switch
Switch
36.105 kB
11.011 kB
36.155 kB
11.016 kB
50 B
5 B
react-table
DataGrid
159.481 kB
44.953 kB
159.531 kB
44.975 kB
50 B
22 B
react-table
Table as DataGrid
130.702 kB
35.962 kB
130.752 kB
35.992 kB
50 B
30 B
react-table
Table (Selection only)
69.089 kB
19.325 kB
69.139 kB
19.357 kB
50 B
32 B
react-table
Table (Sort only)
67.732 kB
18.942 kB
67.782 kB
18.973 kB
50 B
31 B
react-tree
FlatTree
147.803 kB
42.147 kB
147.853 kB
42.169 kB
50 B
22 B
react-tree
PersonaFlatTree
149.631 kB
42.53 kB
149.681 kB
42.544 kB
50 B
14 B
react-tree
PersonaTree
145.691 kB
41.358 kB
145.741 kB
41.373 kB
50 B
15 B
react-tree
Tree
143.869 kB
40.986 kB
143.919 kB
41.004 kB
50 B
18 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-combobox
Combobox (including child components)
105.208 kB
34.168 kB
react-combobox
Dropdown (including child components)
105.832 kB
34.1 kB
react-components
react-components: Button, FluentProvider & webLightTheme
70.397 kB
19.96 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
236.663 kB
68.729 kB
react-components
react-components: FluentProvider & webLightTheme
43.612 kB
14.022 kB
react-datepicker-compat
DatePicker Compat
225.158 kB
63.633 kB
react-input
Input
26.28 kB
8.702 kB
react-list
List
87.11 kB
25.762 kB
react-portal-compat
PortalCompatProvider
8.386 kB
2.624 kB
react-progress
ProgressBar
20.097 kB
7.834 kB
react-radio
RadioGroup
14.035 kB
5.7 kB
react-select
Select
26.085 kB
9.437 kB
react-slider
Slider
36.356 kB
12.08 kB
react-spinbutton
SpinButton
33.804 kB
11.125 kB
react-swatch-picker
@fluentui/react-swatch-picker - package
104.305 kB
29.944 kB
react-table
Table (Primitives only)
40.997 kB
13.172 kB
react-tag-picker
@fluentui/react-tag-picker - package
186.596 kB
55.849 kB
react-textarea
Textarea
24.668 kB
8.969 kB
react-timepicker-compat
TimePicker
108.174 kB
35.695 kB
🤖 This report was generated against 0e111eb97a7df1642e15cb0618670ba56f0abe9f

@github-actions

Copy link
Copy Markdown

Pull request demo site: URL

@dmytrokirpa dmytrokirpa force-pushed the feat/react-label-base-hooks branch from 9dbd287 to d7d9b60 Compare March 26, 2026 18:22
Comment thread packages/react-components/react-label/library/src/components/Label/Label.types.ts Outdated
@dmytrokirpa dmytrokirpa merged commit 48c1691 into microsoft:master Mar 31, 2026
12 checks passed
tudorpopams pushed a commit to tudorpopams/fluentui that referenced this pull request Apr 14, 2026
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.

2 participants