Dark Mode and Theming

Modes and themes allow styles to easily change when used in different contexts or users' preferences.

Applying different Themes and Modes on coded components

Legacy Theme

The theme that components will use can only be defined during the initialization of the components as a parameter like so:


                                                        
                                                        
                                                            import { registerSparkComponents } from 'genesys-spark';
                                                        
                                                        registerSparkComponents({theme: 'legacy'});
                                                        
                                                            

The only current theme we have is ā€˜legacy' .

Dark Mode

You can apply Dark Mode to any element of the HTML(That is using Flare’s colors) using the flare-mode attribute, this will affect the element’s children also:


                                                        
                                                        
                                                            <gux-card flare-mode="dark">
                                                            I'm a Dark Mode card!
                                                            <gux-button>I'm a Dark Mode button too!</gux-button>
                                                        </gux-card>