Skip to content

Releases: primer/react

@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

@primer/react@38.18.0

30 Mar 20:20
1625489

Choose a tag to compare

Minor Changes

  • #7700 91bf343 Thanks @francinelucca! - ActionMenu: Graduate primer_react_action_menu_display_in_viewport_inside_dialog feature flag. ActionMenu now automatically uses displayInViewport when rendered inside a Dialog, without requiring the feature flag.

  • #7699 1505d9b Thanks @francinelucca! - SelectPanel: Add displayInViewport prop

  • #7662 39c8cf3 Thanks @HiroAgustin! - Timeline: Update clipSidebar prop to accept 'start', 'end', or 'both' in addition to boolean. Use 'start' to only clip the top, 'end' to only clip the bottom, or 'both'/true to clip both ends.

  • #7686 6cd13c0 Thanks @JelloBagel! - StateLabel: Add new type: archived

Patch Changes

  • #7690 b492cc8 Thanks @HiroAgustin! - fix(Button): Apply inline-flex display to loading wrapper for link variant buttons

  • #7696 1acb7d3 Thanks @francinelucca! - Fix item dividers not visible in SelectPanel and FilteredActionList when showItemDividers is enabled, caused by content-visibility: auto clipping the absolutely-positioned divider pseudo-elements.

  • #7683 f05fcac Thanks @liuliu-dev! - Dialog: dynamically switch footer button layout based on available height.

  • #7676 35ca056 Thanks @HiroAgustin! - Remove link underline effect on hover for both Link (inline) and Button with variant link (no visuals)

  • #7631 0ecaf6f Thanks @mattcosta7! - Add test to validate that the muted prop is not leaked as a bare DOM attribute on Link