color-schemelight-dark()
(see color-scheme: only light, which prevents browsers with an automatic
dark mode from recoloring your application. To enable automatic theme switching based on system settings, add the
.scheme-light-dark CSS class to the <html> element or any HTML element. This applies the selected theme to all child
elements. For pages or sections that support one theme only, use .scheme-only-light or .scheme-only-dark.prefix property of PorscheDesignSystemProvider.// index.tsx
import ReactDOM from 'react-dom';
import { PorscheDesignSystemProvider } from '@porsche-design-system/components-react';
import { App } from './App';
ReactDOM.render(
<React.StrictMode>
<PorscheDesignSystemProvider prefix="sample-prefix">
<App />
</PorscheDesignSystemProvider>
</React.StrictMode>,
document.getElementById('root')
);
PHeading component will render as <sample-prefix-p-heading>.// App.tsx
import { PHeading } from '@porsche-design-system/components-react';
export const App = (): JSX.Element => <PHeading>Some heading</PHeading>;
