Dynamic Theme Switching in APEX by User

 

Introduction:

In Oracle APEX, the visual appearance of your application is controlled by the theme and theme styles. A well-designed theme not only enhances user experience but also helps maintain consistent branding across your application.


Sometimes, you may want to let users personalize the look and feel — for example, switching between light and dark modes, or applying different color schemes for various departments or clients.

In this post, we’ll walk through a simple and effective way to change the application’s theme style dynamically at runtime using APEX components like Application Items, Computations, Dynamic Actions, and the APEX_THEME API — all without writing complex code.


Step 1 : Create one Application Item 



Step 2 : Create Application Computation and use that above Application Item 



Step 3 : Create region and page item which is in select list or Switch






Step 4 : Create Dynamic Action , On change of event execute Code 


Conclusion:

By following these steps, you’ve successfully enabled dynamic theme switching in your Oracle APEX application. This approach not only improves the user experience but also adds a level of personalization and flexibility to your app.

Whether it’s switching to a dark theme for better visibility or applying a brand-specific color palette, users can now easily tailor the interface to their preference. You can further extend this by saving the selected theme style in a user preference table, so it automatically loads the next time the user logs in.


Comments