primereact icon indicating copy to clipboard operation
primereact copied to clipboard

[v11] Tabs: First tab isn't shown by default on page load

Open callumgare opened this issue 2 months ago • 2 comments

Describe the bug

The Tabs component doesn't show the contents of the first tab (or any tab) until you click a tab. I'm seeing this when coping the first example from https://v11.primereact.org/docs/components/tabs into the nextjs starter project (linked to form here https://v11.primereact.org/docs/installation/nextjs) which has been updated to the latest version of react prime v11 (alpha 7) and the latest version of nextjs (16). So might be nextjs specific, not sure.

Reproducer

https://stackblitz.com/edit/stackblitz-starters-ea8ewjrb

System Information

System:
    OS: macOS 15.6.1
    CPU: (10) arm64 Apple M2 Pro
    Memory: 1.03 GB / 32.00 GB
    Shell: 4.0.2 - /opt/homebrew/bin/fish
  Binaries:
    Node: 20.19.4 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.8.2 - /opt/homebrew/bin/npm
    Deno: 2.4.5 - /opt/homebrew/bin/deno
  Browsers:
    Chrome: 142.0.7444.135
    Edge: 142.0.3595.65
    Firefox: 145.0
    Safari: 26.1
  npmPackages:
    primereact: ^11.0.0-alpha.7 => 11.0.0-alpha.7 
    react: 19.2.0 => 19.2.0 
    tailwindcss: ^4 => 4.1.17

Steps to reproduce the behavior

  1. Download and run the stackblitz project. I couldn't get it to actually run in stackbliz in the browser due to issues with next.js's turbopack and wasm but if you download the project and run it locally it should work.

  2. Observe the use of the Tabs component on the home page and how loading the home page shows no tabs content until you actually click a tab:

Image Image

Expected behavior

The contents of the first tab to be shown by default as seen in the examples in the docs.

callumgare avatar Nov 13 '25 02:11 callumgare

V11 is alpha and still a work in progress...

melloware avatar Nov 13 '25 11:11 melloware

Yes, sorry I should have clarified. I’m not concerned about this issue since as you say it’s just an alpha. I just made the ticket so as there would be something to track this one by.

Very excited about v11 btw! I’ve been using PrimeVue with css custom props for theming for a while now and it’s basically my perfect ui library. So I’ve been eagerly awaiting PrimeReact’s move to css custom props for theming.

Thanks for all your hard work! ❤️

callumgare avatar Nov 15 '25 00:11 callumgare