Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(AppShell): add wash background color to root container (#328)

Cindy Zhangeb37f49341f1
diff --git a/packages/core/src/AppShell/XDSAppShell.tsx b/packages/core/src/AppShell/XDSAppShell.tsx
index 8dd331aa47..3da43116a2 100644
--- a/packages/core/src/AppShell/XDSAppShell.tsx
+++ b/packages/core/src/AppShell/XDSAppShell.tsx
@@ -58,6 +58,14 @@ const MAIN_CONTENT_ID = 'xds-app-shell-main';
export type XDSAppShellBreakpoint = 'sm' | 'md' | 'lg' | 'none';
export interface XDSAppShellProps {
+ /**
+ * Background color of the shell.
+ * - `wash`: Page-level background — subtle gray in light, near-black in dark
+ * - `surface`: Card/panel background — white in light, dark gray in dark
+ * @default 'surface'
+ */
+ background?: 'wash' | 'surface';
+
/**
* Optional banner slot for system-wide announcements.
* Renders above the top nav and scrolls away with the page in auto mode.
@@ -136,6 +144,12 @@ const styles = stylex.create({
flexDirection: 'column',
position: 'relative',
},
+ rootBgWash: {
+ backgroundColor: colorVars['--color-wash'],
+ },
+ rootBgSurface: {
+ backgroundColor: colorVars['--color-surface'],
+ },
rootFill: {
height: '100dvh',
overflow: 'hidden',
@@ -309,6 +323,7 @@ const dynamicStyles = stylex.create({
export const XDSAppShell = forwardRef<HTMLDivElement, XDSAppShellProps>(
function XDSAppShell(
{
+ background = 'surface',
banner,
children,
'data-testid': dataTestId,
@@ -523,6 +538,7 @@ export const XDSAppShell = forwardRef<HTMLDivElement, XDSAppShellProps>(
data-testid={dataTestId}
{...stylex.props(
styles.root,
+ background === 'wash' ? styles.rootBgWash : styles.rootBgSurface,
isFill ? styles.rootFill : styles.rootAuto,
xstyle,
)}>