Skip to content

Releases: primer/react

@primer/react@38.24.0

20 May 15:52
509f46d

Choose a tag to compare

Minor Changes

  • #7829 228019c Thanks @adierkens! - ActionList: Add ActionList.GroupHeading.TrailingAction for header-level actions on grouped lists. Closes #2043.

    When the primer_react_action_list_group_heading_trailing_action feature flag is enabled, you can place an ActionList.GroupHeading.TrailingAction (a small invisible IconButton) inside ActionList.GroupHeading to render a uniform square action target next to the group's heading. Only supported inside an ActionList with the default list role — using it inside ActionMenu or with role="listbox" will throw.

    <ActionList>
      <ActionList.Group>
        <ActionList.GroupHeading as="h3">
          Custom fields
          <ActionList.GroupHeading.TrailingAction label="New field" icon={PlusIcon} />
        </ActionList.GroupHeading>
        <ActionList.Item>...</ActionList.Item>
      </ActionList.Group>
    </ActionList>
  • #7838 8ddf1b0 Thanks @llastflowers! - Add data-component attributes and associated tests for Hidden, InlineMessage, KeybindingHint, Label, and LabelGroup

  • #7776 d6f61c1 Thanks @llastflowers! - Add data-component attributes for Blankslate, BranchName, Breadcrumbs, ButtonGroup, Checkbox, CheckboxGroup, CircleBadge, ConfirmationDialog, CounterLabel, and Dialog to provide stable selectors.

  • #7816 aef8548 Thanks @iansan5653! - Replace ActionBar overflow calculations with CSS wrapping approach to improve performance and stability

  • #7831 0de97c2 Thanks @liuliu-dev! - Dialog: Support custom width values.

  • #7819 8ed6149 Thanks @llastflowers! - Add data-component attributes for Details, Flash, FormControl (+ update InputValidation to forward from FormControl.Validation), Header, and Heading.

Patch Changes

@primer/styled-react@1.0.8

12 May 14:29
de0186b

Choose a tag to compare

Patch Changes

@primer/react@38.23.0

12 May 14:29
de0186b

Choose a tag to compare

Minor Changes

  • #7817 51a7a28 Thanks @francinelucca! - - ActionList: Expand selectableRoles and listRoleTypes to include treeitem and tree.
    • Export ActionListContainerContext as ActionList.ContainerContext.
    • Export useRovingTabIndex from the public API with additional configuration options (preventScroll and dependencies).

Patch Changes

  • #7805 8f8844e Thanks @TylerJDev! - AnchoredOverlay: Disables CSS anchor positioning if portalContainerName is true. (behind primer_react_css_anchor_positioning feature flag)

  • #7800 ce88bdf Thanks @francinelucca! - chore: add primer_react_styled_react_use_primer_theme_providers feature flag to DefaultFeatureFlags

  • #7802 872bf46 Thanks @TylerJDev! - AnchoredOverlay: Ensure overlay fits within viewport by calculating viewport height + width (behind primer_react_css_anchor_positioning feature flag)

@primer/react@38.22.0

06 May 20:01
1aba004

Choose a tag to compare

Minor Changes

  • #7755 0e868f9 Thanks @francinelucca! - feat: add ActionList, SelectPanel primitives exports and new FilteredActionList.Input components

Patch Changes

  • #7797 3e05935 Thanks @liuliu-dev! - Breadcrumbs overflow menu no longer appears when there are only two crumb items.

  • #7511 eb73dee Thanks @RSoeborg! - Fix NavList parent item flicker during static-to-interactive transitions when navigating between current sub-items in a SubNav.

  • #7619 68aaf61 Thanks @hectahertz! - Memoize ActionMenu context values to prevent unnecessary re-renders of menu items

  • #7708 d0fa0ff Thanks @hectahertz! - perf(css): audit :has() selectors and add stylelint guard for Safari

  • #7775 4b7e4ca Thanks @TylerJDev! - AnchoredOverlay: Ensure styles persist on anchors even when re-mounted (behind feature flag)

  • #7780 8330aad Thanks @francinelucca! - fix: Checkbox indeterminate state now persists on click if the state didn't change

@primer/react@38.21.1

28 Apr 17:39
a543de6

Choose a tag to compare

Patch Changes

  • #7770 619175c Thanks @LisaKr! - Defer useAnchoredPosition initial mount setState from useLayoutEffect to useEffect when overlay is closed, eliminating unnecessary cascading re-renders that block paint.

@primer/react@38.21.0

27 Apr 17:38
a217832

Choose a tag to compare

Minor Changes

  • #7760 b2e0efd Thanks @siddharthkp! - Deprecate the useResponsiveValue hook.

  • #7724 d813099 Thanks @francinelucca! - Add stable data-component selectors to multiple components following ADR-023:

    • ActionBar
    • ActionList and friends
    • Button
    • FilteredActionList and friends
    • Link
    • LinkButton
    • Pagination
    • SelectPanel and friends
    • Table and friends
    • TextInput
    • TextInputWithTokens
    • TooltipV2

    This enables consumers to query and test components using stable selectors like [data-component="Table.Row"].

  • #7766 b3f06f1 Thanks @TylerJDev! - AnchoredOverlay: (Behind feature flag) Make popover API usage opt-in

  • #7763 b288d6e Thanks @liuliu-dev! - Add borderRadius prop to Card component.

Patch Changes

  • #7714 e974d9f Thanks @hectahertz! - perf(ActionList): replace :has() selector with JS-computed attribute

  • #7754 9e3fe4b Thanks @liuliu-dev! - Breadcrumbs: On narrow viewports, only show the current page breadcrumb and the overflow menu when overflow="menu" is set.

  • #7757 ed82a1e Thanks @liuliu-dev! - SelectPanel: Lock body scroll when modal variant is on.

  • #7734 421ebf0 Thanks @llastflowers! - add data-component attributes for Avatar, AvatarStack, Banner, & BaseStyles

@primer/styled-react@1.0.6

15 Apr 14:33
aeffb84

Choose a tag to compare

Patch Changes

@primer/react@38.20.0

15 Apr 14:33
aeffb84

Choose a tag to compare

Minor Changes

  • #7723 ec6c88f Thanks @liuliu-dev! - Add Card component with subcomponents: Card.Icon, Card.Image, Card.Heading, Card.Description, Card.Menu, and Card.Metadata

  • #7725 d7b9313 Thanks @TylerJDev! - AnchoredOverlay: Remove polyfill for CSS Anchor Positioning, use primer/behaviors as fallback. Ensure overlays take available space.

  • #7752 d7380a7 Thanks @liuliu-dev! - Breadcrumbs: Graduate primer_react_breadcrumbs_overflow_menu feature flag, making the overflow menu behavior always-on.

  • #7733 b9211db Thanks @francinelucca! - Overlay: Graduate primer_react_overlay_max_height_clamp_to_viewport feature flag

    The max-height of overlays is now clamped to the viewport height by default using min(size, 100dvh). This prevents overlays from extending beyond the viewport on smaller screens.

  • #7698 5c34ab4 Thanks @hectahertz! - Timeline: add variant prop to Timeline.Badge for built-in color schemes (accent, success, attention, severe, danger, done, open, closed, sponsors)

Patch Changes

  • #7738 f5f2869 Thanks @francinelucca! - ActionMenu, Table: Fix component mutation issue where Object.assign was modifying original @primer/react components. Now uses wrapper components to avoid side effects.

  • #7747 b7dfb78 Thanks @copilot-swe-agent! - Fix IssueLabelToken text contrast in light theme by updating the lightness-switch formula to use a division-based approach that properly produces a binary switch value for selecting black vs white text

  • #7739 efa7af8 Thanks @copilot-swe-agent! - Spinner: Remove feature flag primer_react_spinner_synchronize_animations, treat it as always enabled.

  • #7746 30206c4 Thanks @jonrohan! - Update TokenTextContainer line-height to use primer primitives CSS variable var(--base-text-lineHeight-normal)

@primer/mcp@0.3.2

15 Apr 14:33
aeffb84

Choose a tag to compare

Patch Changes

@primer/react@38.19.0

09 Apr 10:59
5cc0bbc

Choose a tag to compare

Minor Changes

  • #7677 c1a81b1 Thanks @TylerJDev! - AnchoredOverlay: Add Popover API to AnchoredOverlay (behind primer_react_css_anchor_positioning feature flag)

  • #7697 990ce7b Thanks @hectahertz! - Stack: Add tight (4px) and cozy (12px) spacing values to gap and padding props. Add paddingBlock and paddingInline props for directional padding control.

Patch Changes

  • #7652 5d19e2b Thanks @owenniblock! - useAnchoredPosition: recalculate overlay position when any scrollable ancestor (or the window) is scrolled.

  • #7707 6431bfe Thanks @liuliu-dev! - Fix anchor-name not being set on the anchor element when SelectPanel is opened in Copilot code agent.

  • #7633 a107d39 Thanks @copilot-swe-agent! - Graduate primer_react_css_has_selector_perf feature flag: the CSS :has() performance optimization (body[data-dialog-scroll-disabled]) is now the default behavior for Dialog scroll disabling

  • #7695 780fc3d Thanks @mattcosta7! - perf(ThemeProvider): Reduce unnecessary renders and effect cascades

    • Replace useState + useEffect SSR hydration handoff with useSyncExternalStore — eliminates post-hydration re-render
    • Replace useState + useEffect in useSystemColorMode with useSyncExternalStore — eliminates effect gap and stale-then-update flicker
    • Cache getServerHandoff DOM read + JSON.parse per ID (runs once, not on every call)
    • Memoize context value object to prevent unnecessary re-renders of all consumers
  • #7706 fd8910a Thanks @liuliu-dev! - ActionList.Item: fix inline descriptions being referenced via aria-labelledby instead of aria-describedby