Primer React v36 Release #3889
                  
                    
                      joshblack
                    
                  
                
                  announced in
                Announcements
              
            Replies: 1 comment 1 reply
-
| is it possible that  | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We're excited to announce the next major release of Primer React! 🥳 Starting in v36, you'll see changes to
@primer/reactthat make it even easier to build consistent, accessible experiences that feel right at home at GitHub.We'd love to hear from you and get feedback on these changes. Let us know in a comment below if you run into any bugs, if a change to a component you were using. is unclear, or if you have any other feedback about this release.
New components ✨
The following components have been moved from
@primer/react/draftsto@primer/react:TreeViewNavListSegmentedControlSplitPageLayoutBreaking changes⚠️ 
The v36 release of
@primer/reactintroduces several breaking changes to components and changes to the package itself. To understand how to migrate between v35 and v36 of@primer/react, review the sections below to understand how your project may be impacted by these changes.Components
The following list of components have breaking changes to their API or availability in
@primer/react. For a list of deprecated components that have been removed, visit the Removed components section below.AvatarTokenButtonCheckboxFilterListFilterSearchFormControlRadioTextareaTextInputWithTokensUnderlineNavAvatarToken
The
sizeprop forAvatarTokenhas been updated in v36 to only accept"large"and"xlarge".Button
The API for the
Buttoncomponent has been updated to match the specification for this component and align with other implementations like in Primer View Components.The
leadingIconprop has been renamed toleadingVisualThe
trailingIconprop has been renamed totrailingVisualThe
Button.Countercomponent has been removed, use thecountprop insteadThe
outlinevariant has been removed, instead usevariant="invisible"Checkbox
The
validationStatusprop has been updated and no longer supports the'warning'value. Instead, only'error'and'success'are supported.FilterList
The
FilterListcomponent has been deprecated in v36 in favor of theActionListcomponent. To continue using this component, update your imports forFilterListto import from thedeprecatedentrypoint.FilterSearch
The
FilterSearchcomponent has been deprecated in v36. A new filter component is currently in progress but is not yet available. Until a new component is ready, use a combination ofButton,TextInput, andActionListto reproduce this component. To continue using this component, update your imports forFilterSearchto import from thedeprecatedentrypoint.FormControl
The
variantprop for theFormControl.Validationcomponent has been updated to no longer support the'warning'value. Instead, only'error'and'success'are supported.Radio
The
validationStatusprop has been updated and no longer supports the'warning'value. Instead, only'error'and'success'are supported.Textarea
The
validationStatusprop has been updated and no longer supports the'warning'value. Instead, only'error'and'success'are supported.TextInputWithTokens
The
sizeprop has been updated to no longer accept theextralargevalue. Usexlargeinstead.UnderlineNav
The implementation for
UnderlineNavhas been updated in v36. Certainpropsfor UnderlineNav have been removed and theUnderlineNav.Linkcomponent has been replaced byUnderlineNav.Item.actionsalignfullUnderlineNav.Itemcomponentselectedaria-currentpropTo continue using the implementation for
UnderlineNavfromv35, import the component from@primer/react/deprecated.Removed components
The following deprecated components have been removed from
@primer/reactand are no longer available.BorderBox<BorderBox>→<Box borderWidth='1px' borderStyle='solid' borderColor='border.primary' borderRadius={2}>ChoiceFieldsetCheckboxGrouporRadioGroupcomponentItemCheckboxGrouporRadioGroupcomponentChoiceInputFieldFormControlcomponentFlexBoxcomponent,<Flex>→<Box display="flex">GridBoxcomponent,<Grid>→<Box display="grid">PositionBoxcomponent,<Position>→<Box>AbsoluteBoxcomponent,<Absolute>→<Box position="absolute">FixedBoxcomponent,<Fixed>→<Box position="fixed">RelativeBoxcomponent,<Relative>→<Box position="relative">StickyBoxcomponent,<Sticky>→<Box position="sticky">DropdownActionMenucomponentFormGroupFormControlcomponentInputFieldFormControlcomponentLabelLabelcomponent from the@primer/reactentry pointSelectMenuActionMenucomponentActionListActionListcomponent from the@primer/reactentry pointActionMenuActionMenucomponent from the@primer/reactentry pointDropdownButtonActionMenucomponentDropdownMenuActionMenucomponentButtonButtoncomponent from the@primer/reactentry pointButtonDangerButtoncomponent withvariant="danger"ButtonOutlineButtoncomponent withvariant="outline"ButtonPrimaryButtoncomponent withvariant="primary"ButtonInvisibleButtoncomponent withvariant="invisible"ButtonTableListActionMenucomponentButtonCloseIconButtoncomponent,<IconButton icon={XIcon} aria-label="Close" />StyledOcticonOcticoncomponentPackage 📦
Changes to peer dependencies 🏗️
The following peer dependencies have been updated, or added, to require a new minimum version in v36 of
@primer/react:react^17.0.0 || ^18.0.0^18.0.0react-dom^17.0.0 || ^18.0.0^18.0.0styled-components4.x || 5.x5.x@types/styled-components5.xThese dependencies will need to be updated or installed in your project if you are not using the corresponding version range for v36. To see if you're using the correct versions, look in your project's
package.jsonfile and see if the versions match the table above.draftshas been moved toexperimentalThe
draftsentrypoint has been deprecated in v35 and removed in v36. It has been replaced by theexperimentalentrypoint to better reflect the component lifecycle process for Primer.Beta Was this translation helpful? Give feedback.
All reactions