diff --git a/.changeset/clean-bags-occur.md b/.changeset/clean-bags-occur.md new file mode 100644 index 0000000000..bf376e2300 --- /dev/null +++ b/.changeset/clean-bags-occur.md @@ -0,0 +1,69 @@ +--- +'@backstage/ui': minor +--- + +**BREAKING**: Replaced `Surface` / `onSurface` system with new `Bg` background system + +The old `Surface` type (`'0'`–`'3'`, `'auto'`) and its associated props (`surface`, `onSurface`) have been replaced by a new `Bg` type with semantic neutral levels (`'neutral-1'` through `'neutral-4'`) and intents (`'danger'`, `'warning'`, `'success'`). Leaf components like Button no longer need an explicit prop — backgrounds auto-increment from parent context. + +New `useBg` hook and `BgProvider` replace the deleted `useSurface` hook and `SurfaceProvider`. + +**Migration:** + +Rename the `surface` prop to `bg` on container components and update values: + +```diff +- ++ + +- ++ + +- ++ + +- ++ +``` + +Remove `onSurface` from leaf components — it is now fully automatic: + +```diff +-