Is there a supported way to style the tab strip background and New Sheet button

Posted by: averma on 30 July 2026, 1:25 am EST

  • Posted 30 July 2026, 1:25 am EST - Updated 30 July 2026, 1:31 am EST

    Hi SpreadJS Team,

    We are using SpreadJS v18.2.3 and are customizing the workbook UI to match our application’s light and dark themes.

    We are currently using spread.sheetTabStyles.add(…), which allows us to customize the appearance of individual sheet tabs (normal, hover, and active states). However, we would also like to customize the surrounding tab strip UI.

    Specifically, we’d like to know if there is a supported way to style the following:

    The tab strip background (the area surrounding the sheet tabs).

    The New Sheet (+) button (background, icon colour, hover/active states).

    The sheet navigation buttons (previous/next sheet arrows).

    Any other UI elements within the sheet tab strip area.

    We couldn’t find any APIs in the documentation for styling these elements, apart from configuring their visibility (for example, newTabVisible).

    I’ve attached the screenshot for the design we are looking to make.

  • Posted 31 July 2026, 5:50 am EST

    Hi,

    Thanks for the mockup — it’s clear what you’re after for both themes, and yes, this is doable, though most of it sits outside the documented API surface.

    Sheet tabs themselves (normal/hover/active) are covered by sheetTabStyles.add(), as you’ve found. For the tab strip chrome around them — background, +, nav arrows, and the rest — SpreadJS doesn’t expose a documented styling API, but the elements are hooked up to internal CSS classes you can override. Here’s what we can confirm for v18.2.3:

    Element CSS class(es)

    Tab strip background .gc-tabStripBackground

    New Sheet (+) button — hover / pressed .gc-tabStripNewTab-hover, .gc-tabStripNewTab-highlight

    Prev/Next navigation arrows — normal / hover / pressed

    .gc-navButton-normal, .gc-navButton-hover, .gc-navButton-highlight

    Overflow “more” button — hover / pressed .gc-navMoreButton-hover, .gc-navMoreButton-highlight

    “All Sheets” ☰ button — hover / pressed .gc-tab-strip-all-sheets-hover, .gc-tab-strip-all-sheets-highlight

    Resize splitter handle .gc-tabStripResizeBarInner

    A few things worth knowing before you use these:

    .gc-tabStripBackground is a real DOM element, so any CSS property works on it — background-color, gradients, borders, whatever you need.

    The +, nav arrows, overflow, and All Sheets buttons are drawn on canvas, not DOM. SpreadJS reads the computed border-color off these classes at paint time and uses it as the icon’s stroke color, so border-color is effectively the only property with a visible effect. background-color, border-radius, etc. are silently ignored on these.

    The resize handle is a thin line, not a bordered shape, which is why color (not border-color) is the property that moves it.

    A starting point for a light/dark toggle, using your palette in place of these placeholder values:

    /* Light theme */
    .gc-tabStripBackground   { background-color: #f6f6f6; }
    .gc-tabStripResizeBarInner { color: #ababab; }
    .gc-navButton-normal      { border-color: #6b6b6b; }
    .gc-navButton-hover       { border-color: #7b61ff; }
    .gc-navButton-highlight   { border-color: #4b2fd6; }
    .gc-tabStripNewTab-hover     { border-color: #7b61ff; }
    .gc-tabStripNewTab-highlight { border-color: #4b2fd6; }
    .gc-navMoreButton-hover      { border-color: #7b61ff; }
    .gc-navMoreButton-highlight  { border-color: #4b2fd6; }
    .gc-tab-strip-all-sheets-hover     { border-color: #7b61ff; }
    .gc-tab-strip-all-sheets-highlight { border-color: #4b2fd6; }
    
    /* Dark theme — scope under whatever selector drives your dark mode */
    .app-dark .gc-tabStripBackground   { background-color: #1e1b29; }
    .app-dark .gc-tabStripResizeBarInner { color: #55506b; }
    .app-dark .gc-navButton-normal      { border-color: #cfc9e8; }
    .app-dark .gc-navButton-hover       { border-color: #9d85ff; }
    .app-dark .gc-navButton-highlight   { border-color: #5b3fe0; }
    .app-dark .gc-tabStripNewTab-hover     { border-color: #9d85ff; }
    .app-dark .gc-tabStripNewTab-highlight { border-color: #5b3fe0; }
    .app-dark .gc-navMoreButton-hover      { border-color: #9d85ff; }
    .app-dark .gc-navMoreButton-highlight  { border-color: #5b3fe0; }
    .app-dark .gc-tab-strip-all-sheets-hover     { border-color: #9d85ff; }
    .app-dark .gc-tab-strip-all-sheets-highlight { border-color: #5b3fe0; }

    After switching classes or toggling theme, force a redraw so SpreadJS re-reads the computed styles:

    spread.invalidateLayout();
    spread.repaint();

    Best regards,

    Priyam

  • Posted 31 July 2026, 6:20 am EST

    Follow-up to the tab strip theming question above. We implemented the CSS class overrides exactly as documented (.gc-tabStripBackground, .gc-tabStripNewTab-normal/-hover/-highlight, .gc-tabStripResizeBarInner, etc.), including spread.invalidateLayout() + spread.repaint() after each theme change as instructed — but none of the styling is taking visible effect.

    A few things worth checking on your end:

    We’re using the excel2013white skin (import “@mescius/spread-sheets/styles/gc.spread.sheets.excel2013white.css”). Are the class names you provided specific to a different/default skin, or should they apply identically regardless of skin?

    Could you confirm the exact class names by inspecting a live v18.2.3 + excel2013white build? We don’t see any of the listed classes (gc-tabStripBackground, gc-tabStripNewTab-, gc-navButton-, etc.) present on the tab strip DOM at all when inspecting via browser devtools.

    Separately — is there any supported way to set the New Sheet (+) button’s background color specifically? Your earlier reply noted background-color is silently ignored on that canvas-drawn element (only border-color/icon stroke renders), which means a background visually distinct from the tab strip background isn’t achievable via the documented classes at all. Is there an internal API/property for this, or is it genuinely unsupported?

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels