Demos
Basis example
Surface dark
Use surface="dark" to adjust component styles for dark backgrounds.
<section style={{ padding: '1rem', backgroundColor: 'var(--token-color-decorative-first-bold-static)', }} > <Theme.Context surface="dark"> <Button right>Primary button</Button> <Button variant="secondary" right> Secondary button </Button> <Anchor href="/">Anchor on dark surface</Anchor> </Theme.Context> </section>
Surface initial
Use surface="initial" to reset components back to their default surface behavior inside a dark surface context.
<Section surface="dark" innerSpace> <Button right>Dark surface button</Button> <Theme.Context surface="initial"> <Button>Default surface button</Button> </Theme.Context> </Section>