-
Notifications
You must be signed in to change notification settings - Fork 17
Changelog
Ruo Ling edited this page Oct 24, 2025
·
259 revisions
V2 changelog | V3 migration guide
- [a11y] Improve
IconButtonandImageButtonaccessibility - [a11y] Improve
UnitNumberInputaccessibility - New
Tablecomponent to create tables from scratch (details)
- Let
Mastheadtake up the full width whenstretchis enabled
- Fix broken IMDA footer links
- Update
NavbarandFooterto show IMDA resources for IMDA theme - Add error icon to error messages across inputs,
FileUploadandFileDownload - [a11y] Improve
UneditableSectionaccessibility - [a11y] Improve
RadioButtonaccessibility -
[BREAKING] [a11y] Add underline style by default to
Typography.Link. This can be removed by settingunderlineStyle="none"
- Extend
FileUploadmobile layout tomdto resolve UI issues on smaller viewports
- Add primary colour variant for
PillandTag -
Filter.Checkboxenhancements- Support nested options
- Use
showAsCheckboxInMobileto display checkbox list in mobile view - Use
minimisableOptionsto hide the "View more" button
- Add component token to control
LoadingDotsSpinnercolour- LifeSG theme defaults to
brand-50 - Other themes default to
icon-primary
- LifeSG theme defaults to
- [a11y] Improve accessibility of
PhoneNumberInputandInputGrouplist variant
- Fix unreadable text in dark mode for read-only
InputGroupandPhoneNumberInput
- [a11y] Fix label association in
FileUpload - Avoid unmounting
Filterin mobile - Fix persistent scroll lock on iOS when
Overlay/Modalis forcefully unmounted
- New
IMDAtheme - New
ModalV2(details)- Provides a new compositional API that lets you combine pre-built content slots
- Supports scrolling, compared to V1 where you had to manually handle content overflow
- Comes with improved accessibility and focus trapping
-
[WARNING]
ModalAnimationDirectionimport has moved from Modal to ModalV2 -
FullscreenImageCarouselnow applies the bottom inset - Enhancement to
InputGrouplist addon variant- Update styling to new card-based dropdown and V3 design
- Fix dropdown getting cut off when it exceeds the parent container bounds
- Support auto positioning
-
PhoneNumberInputwhich is based onInputGroupalso has the above enhancement applied
- [BREAKING] Standardise all read-only inputs to align left
- Fix
Sidenavitem hover highlight persisting even after cursor leaves the item
- Add
fullWidthprop to renderUneditableSectionwithout the defaultLayout.Contentspacing
- Update styling of
OtpInput - Add padding to
DataTableaction bar's floating state - Restore scrollbar styles in
DataTableandSelectpickers
- Sync
Accordionstate between parent and children. "Show/Hide all" button now properly reflects the actual state of all items
- [a11y] Improve
Alertaccessibility - [a11y] Improve
Draweraccessibility and add focus trapping - [a11y] Improve
CountdownTimeraccessibility - Add prefix option to
OTPInput - Support custom/safe area insets in
Filtermobile mode
- Fix some text styles not being applied
- Resolve "A callback ref should not return a function" warning on React 18
-
[WARNING] Add alternative scroll lock method on iOS for
OverlayandModal. As a side effect, this resolves a cosmetic issue where the page content is visible behind the status bar and tab bar on iOS 26.
- New
Schedulecomponent (details) - Support custom clear button label in
Filter - Support custom/safe area insets in
FullscreenImageCarousel - Introduce
onModalOpentoFilter -
[WARNING] Replace
listStyleWidthwithdropdownWidthto customise the width of the dropdowns inInputSelect,MultiSelect,NestedSelect, andNestedMultiSelect -
[WARNING] Increase
lgbreakpoint from1024pxto1200px
- Disable active/hover states for
Button,Checkbox,RadioButtonandToggleon devices where the primary pointer is notfine
- [a11y] Improve
BoxContaineraccessibility - [a11y] Improve
FileUploadaccessibility - [a11y] Improve
Paginationaccessibility - [a11y] Improve
Filteraccessibility and add focus trapping in mobile modal
- Gracefully handle missing icon for
ButtonWithIcon - Resolve unknown prop warnings on styled components by marking props as transient
- Fix issue where the polymorphic
asprop was not respected byTypography - Resolve
act()warnings in unit tests
- Add React 19 support
- [BREAKING] Upgrade Styled Components to v6. Refer to the official docs for migration steps
- New shadow tokens
- Add SupportGoWhere resources in
NavbarandFooter - Support hiding of
Footerlogo - Support custom
fadeColorinTab - Support custom dropdown labels for
InputSelect,MultiSelect,NestedSelect,NestedMultiSelect-
[WARNING] The props
noResultsDescriptionandsearchPlaceholderare now undercustomLabels. The original props have been deprecated
-
[WARNING] The props
-
[WARNING] The
FilterpropsheaderTitle,toggleFilterButtonLabel, anddoneButtonLabelare now undercustomLabels. The original props have been deprecated -
[BREAKING] Rename
customLabeltocustomLabelsinLinkList - [a11y] Improve
Toastaccessibility and enhance keyboard navigation - [a11y] Improve
Pillaccessibility - [a11y] Improve
ProgressIndicatoraccessibility
- Fix unresponsive
Toggleon iOS devices
Important
Known issues with styled-components v6
- If youβre using pseudo-classes or pseudo-elements, make sure they they are prefixed with
&. You can search by this regex\s+:?:[a-zA-Z0-9]in your codebase. For example:
- :hover { }
- ::before { }
+ &:hover { }
+ &::before { }- If youβre using jest-dom
expect().toHaveStyle(), your tests may now fail due to extra whitespace, please update your assertions accordingly
- [a11y] Improve
Footeraccessibility - Introduce
onExpandCollapseChangeprop, called when "Show all"/"Hide all" is toggled inAccordion
- Fix
DateRangeInputjumping to present month when the date is cleared due to user input or when selecting a start date after the end date
- New
Menucomponent (details) - Support custom label for Done button in
Filter - Add lazy-loading mode for
LinkList -
[WARNING] Separate subtitle from label container in
Form.Labelto distinguisharia-labelledbyandaria-describedby. This affects all inputs under theFormnamespace - [a11y] Improve labelling of
Form.DateInputandForm.DateRangeInput -
Form.Input- [a11y] Improve labelling
- [WARNING] The input now remains focusable even when disabled
-
Footer- Add
showResourceAddonprop to render additional content for MyLegacy - Switch to fluid layout instead of grid
- Add
-
NotificationBanner- Support optional
icon - [a11y] Improve accessibility
- Support optional
-
LocalNav- [a11y] Improve accessibility
- [a11y] Support keyboard navigation
-
[WARNING] The
onNavItemSelectevent now includesReact.KeyboardEventin addition toReact.MouseEvent
-
Toggle- [a11y] Improve accessibility
- [a11y] Add keyboard focus style
- Fix padding of
LocalNavlink - Fix misaligned fade in
Breadcrumb
-
[WARNING] Increase
sm-maxbreakpoint from420pxto480px - Adjust cutover for
mdandlgbreakpoints to be consistent with other breakpoints - New
Badgecomponent (details) - New
Avatarcomponent (details) - Reduced toggle min width to 5rem for
Filter.Checkboxin mobile view - [a11y] Make
DataTablefocusable to support scrolling for keyboard-only users - [a11y] Improve
Sidenavaccessibility and enhance keyboard navigation
- Update
OneServicecolour tokens - Fix
info-40and CCubebrand-100colour tokens
- Ensure collapsed
Filter.Itemcontent is inaccessible - Fix missing toggles in
Filter.Checkboxwhen there are more than 5 but less than 3 rows in mobile view
- [a11y] Improve
Breadcrumb,Checkbox, andTagaccessibility -
Buttonenhancements- Improve accessibility
- Introduce
focusableWhenDisabledprop
-
Navbarenhancements- Improve accessibility
- Support Escape key press to dismiss drawer
- Support custom accessible labels for main header and mobile drawer
-
[BREAKING] Pin SGDS
Mastheadto v3 and apply SGDS day and night themes
Important
Breaking changes for Masthead and Navbar users:
If your site has previously whitelisted the script url in the Content Security Policy headers, update it to match the new value
- https://cdn.jsdelivr.net/npm/@govtechsg/sgds-web-component/Masthead/index.js
+ https://cdn.jsdelivr.net/npm/@govtechsg/sgds-web-component@3/components/Masthead/index.umd.js-
Accordionenhancements- Improve aria annotations
-
[BREAKING] Update
Accordion.Itemtitle to be wrapped in a<h3>and<button> - Support customisation of heading level
Important
Breaking changes for Accordion users:
If you are using a custom title, ensure that you are rendering it as a <span>
<Accordion.Item title={<Typography.XL inline>Item title</Typography.XL>}>
<Accordion.Item title={<span>Item title</span>}>
<Accordion.Item title={<h1 as="span">Item title</h1>}>
- Apply border for components with drop shadows in dark mode:
CardNavbarSmartAppBanner
- Adjust spacing between
Paginationelements
- Fix
Paginationtooltip position - Fix incorrect
V2_Text.Hyperlink.Smallmapping inmigrate-textcodemod - Fix missing styles for
Mastheadin dark mode, causing text to become unreadable
- [a11y] Improve
DateInputandDateRangeInputaccessibility and enhance keyboard navigation
- Use colour token for secondary
Buttonbackground - Add missing radius token usage in components
- Make collapsed
Accordion.Itemcontent inaccessible
- New
SupportGoWheretheme - Add component tokens for A11y Playground
- Upgrade to fabric 6 to resolve error in
ESignaturewhenunsafe-evalis not enabled in CSP
- New
SingpassButton(details) - Dark theme (details)
- New set of semantic colour tokens for dark mode
- New
DSThemeProviderto support automatic dark mode based on the user's preferences - Support light/dark mode-specific overrides for primitive and semantic colour tokens
- Update minor ui elements to use colour tokens in the following:
-
Breadcrumbfade effect -
Navbarbackground -
Tabsfade effect -
SelectHistogramtext
-
- Ensure
Markuprespects thebaseTextColorprop - Fix error in
SelectHistogram
- Expose
dropdownRootNodefor components using Floating UI-based dropdowns:-
DateInput,DateRangeInput DateNavigator-
InputSelect,MultiSelect,NestedSelect,NestedMultiSelect SelectHistogram
-
- Ensure search is case-insensitive in
InputSelectandMultiSelect - [a11y] Fix Chrome/Voiceover getting stuck on countdown in
OtpInput
- New
A11yPlaygroundtheme - [a11y] Improve
OtpInputaccessibility and enhance keyboard navigation - [a11y] Improve
Calendaraccessibility and support keyboard navigation
- Update
Mastheadto match new SGDS styling and align with current breakpoints - Fix missing background for the
currentvariant inTimeline
- Support custom width for
Tab.Itemtab selector - Add
maxSelectableprop to set a maximum number of options that can be selected inMultiSelect - Support optional description under the default "No results found" display in
InputSelect,MultiSelect,NestedSelect, andNestedMultiSelect
- Update PA font tokens
Note
- Node 18 reached EOL on 30 Apr 2025. You're recommended to use Node 22 as the minimum version for development
- The pipeline has been upgraded to use Node 22
- Introduce
ThemedLoadingSpinner. Details - Set up component tokens and introduce tokens for
Button
- Update
LoadingSpinnerto remove white background - Fix incorrectly migrated breakpoints in
ButtonandTimeline
-
TimeTableenhancements- Add
pendingrow cell status - Automatically block the entire row if it has no entries and
rowMinTimeandrowMaxTimeare not set - Handle slots in 15 minute intervals, automatically rounding non-standard times
- Update left border colour
- Add
- Resolve React 18+ spread key warning in unit tests for
InputSelect,MultiSelect,NestedSelect, andNestedMultiSelect
- Update PA tokens
- Add
TextListto the top-level exports
- Codemod enhancements
- Migrate
TextStyleHelper.getTextStyle()inmigrate-text - Improve handling of imports
- Migrate
- Add placeholder OneService theme
- Update PA tokens
Caution
V3 is in early alpha
- Disable common ligatures for PlusJakartaSans and Lato font
- Install
jscodeshiftbefore executing codemods - Includes changes from
v2.10.0-canary.6
Caution
V3 is in early alpha
- Update PA theme
- Enable Typescript strict mode - this should not affect you as a consumer. However, you are highly recommended to enable
strictmode (or minimallynoImplicitAny) in your project for improved type safety when accessing design tokens. - Includes changes from
v2.10.0-canary.4
Caution
V3 is in early alpha
- All components migrated to the new V3 design tokens
- Add PA theme
- Includes changes from
v2.10.0-canary.2andv2.10.0-canary.3
Caution
V3 is in early alpha and is not ready for production use
- Migrate existing components to use the new V3 design tokens
- Fixes for codemods
Caution
V3 is in early alpha and is not ready for production use
- Overhaul theming to use new standardised design tokens
- Deprecate components based on the old V2 design tokens
- New components based on the new V3 design tokens
- Codemods to support migration