Skip to content

Releases: primer/react

@primer/react@38.15.1

16 Mar 23:20
3e61f83

Choose a tag to compare

Patch Changes

  • #7625 2e8c707 Thanks @liuliu-dev! - Banner: stack inline actions vertically on narrow viewports.

  • #7554 f34f0c3 Thanks @hectahertz! - perf(ActionList): memoize context values, menuItemProps, and aria attributes

  • #7598 4b345db Thanks @hectahertz! - perf(Banner): replace :has(.BannerActions) with [data-has-actions] attribute selector

  • #7597 adadd38 Thanks @hectahertz! - perf(Button): replace :has(.Visual) with [data-no-visuals] attribute selector in link variant styling

  • #7599 e6513c2 Thanks @hectahertz! - perf(Dialog): replace :has(.Footer) with [data-has-footer] attribute selector for footer border detection

  • #7620 ec0b789 Thanks @hectahertz! - Use stable object reference for DialogContext value to prevent unnecessary re-renders

  • #7621 235126a Thanks @hectahertz! - Memoize SelectPanel overlayProps, focusTrapSettings, and preventBubbling to reduce allocations on re-renders

  • #7600 0d7cc92 Thanks @hectahertz! - perf(TextInput): skip redundant character counter updates

  • #7654 a09a60c Thanks @copilot-swe-agent! - SelectPanel: use 100dvh and env(safe-area-inset-bottom) in fullscreen-on-narrow mode to prevent content from being obscured by iOS Safari's browser chrome.

  • #7545 17ec46f Thanks @hectahertz! - perf(TreeView): defer scrollIntoView to coalesce reflows during rapid navigation

@primer/react@38.15.0

11 Mar 02:11
f644831

Choose a tag to compare

Minor Changes

Patch Changes

@primer/react@38.14.0

03 Mar 14:05
909e9a8

Choose a tag to compare

Minor Changes

  • #7531 0cfb938 Thanks @hectahertz! - SelectPanel: Add built-in client-side list virtualization via a new virtualized prop. When enabled, only the visible items plus a small overscan buffer are rendered in the DOM, dramatically improving performance for large lists.

Patch Changes

  • #7497 931740b Thanks @hectahertz! - Remove render phase setStates on SelectPanel

  • #7532 39a2151 Thanks @hectahertz! - PageLayout: Eliminate forced reflow (~614ms) on mount by replacing getComputedStyle call with a pure JS viewport width check for the --pane-max-width-diff CSS variable.

  • #7555 64c2243 Thanks @hectahertz! - perf(useSlots): short-circuit iteration and skip filled slots

  • #7547 4943d67 Thanks @hectahertz! - perf(useScrollFlash): defer scroll read/write to requestAnimationFrame to avoid forced reflow

  • #7497 931740b Thanks @hectahertz! - Improve SelectPanel performance

  • #7551 2fbfc49 Thanks @hectahertz! - perf(Text): remove unnecessary useRef and useImperativeHandle hooks

  • #7571 59ab235 Thanks @liuliu-dev! - AnchoredOverlay: changed overflow from hidden to auto to prevent content clipping at small viewports.

  • #7553 6225ba2 Thanks @hectahertz! - perf(useRefObjectAsForwardedRef): add dependency array to useImperativeHandle

@primer/mcp@0.3.0

24 Feb 14:59
aa2fcff

Choose a tag to compare

Minor Changes

  • #7574 14c5a6c Thanks @lukasoppermann! - Replace design token tools with enhanced search and bundle system. The single list_tokens tool is replaced by find_tokens, get_token_group_bundle, get_design_token_specs, and get_token_usage_patterns for improved token discovery and usage guidance.

@primer/react@38.13.0

19 Feb 18:39
75bf4ab

Choose a tag to compare

Minor Changes

Patch Changes

  • #7537 4fd987c Thanks @hectahertz! - perf(ActionList): enable React Compiler

  • #7546 86d6897 Thanks @hectahertz! - perf(Announce): skip getComputedStyle when there is no text content to announce

  • #7568 aa46098 Thanks @HiroAgustin! - Blankslate: Add text-wrap: balance to Heading and Description

  • #7552 551ec63 Thanks @hectahertz! - perf(Button): fix CounterLabel remount and remove conditional DEV hook

  • #7504 d91e78e Thanks @TylerJDev! - UnderlineNav: Adds overflow: hidden when the "More" button isn't present

  • #7526 0c2358a Thanks @hectahertz! - Add content-visibility: auto to ActionList items to improve rendering performance for large lists by allowing the browser to skip layout and paint for off-screen items.

  • #7556 6dc1858 Thanks @hectahertz! - perf(ActionList): replace :has([aria-disabled]) child scan with data-is-disabled attribute for faster style recalculation

  • #7548 d4b32c3 Thanks @hectahertz! - perf(useIsMacOS): replace useState+useEffect with useSyncExternalStore to eliminate unnecessary re-render

@primer/mcp@0.2.0

19 Feb 14:39
6dc1858

Choose a tag to compare

Minor Changes

Patch Changes

@primer/react@38.12.0

17 Feb 22:49
9933dc1

Choose a tag to compare

Minor Changes

  • #7348 3c160b2 Thanks @mattcosta7! - Add currentWidth and onResizeEnd props to PageLayout.Pane for controlled resizable width

    The PageLayout.Pane component now supports controlled width:

    • onResizeEnd — callback fired when a resize operation ends (pointer release or keyboard key up). Replaces localStorage persistence. Requires currentWidth.
    • currentWidth — sets the current displayed width in pixels (number | undefined). Pass undefined when the persisted value hasn't loaded yet. Requires onResizeEnd.

    Both props must be provided together (enforced by TypeScript). resizable remains a plain boolean prop.

    These props are only meaningful when resizable={true} — without it, no drag handle renders so onResizeEnd never fires.

    New export:

    • defaultPaneWidth — Record of preset width values: {small: 256, medium: 296, large: 320}

    Example usage:

    import {PageLayout, defaultPaneWidth} from '@primer/react'
    
    // Default behavior (unchanged) — localStorage persistence
    <PageLayout.Pane resizable />
    
    // Controlled width with custom persistence
    const [width, setWidth] = useState(defaultPaneWidth.medium)
    <PageLayout.Pane
      resizable
      currentWidth={width}
      onResizeEnd={(newWidth) => {
        setWidth(newWidth)
        myStorage.save('pane-width', newWidth)
      }}
    />
    
    // Async load — pass undefined until value is fetched
    <PageLayout.Pane
      resizable
      currentWidth={savedWidth ?? undefined}
      onResizeEnd={handleResizeEnd}
    />

Patch Changes

@primer/react@38.11.0

09 Feb 14:38
eb0979b

Choose a tag to compare

Minor Changes

Patch Changes

@primer/styled-react@1.0.3

04 Feb 15:51
4a9b756

Choose a tag to compare

Patch Changes

  • #7499 4f43e82 Thanks @copilot-swe-agent! - Remove deprecated component exports from @primer/styled-react that no longer have usage tracked in primer query

@primer/react@38.10.0

04 Feb 15:51
4a9b756

Choose a tag to compare

Minor Changes