Migrate from Lara (styled) to unstyled mode possible? #4726
-
|
Hi 👋 We’re using PrimeNG with preset similar to Lara and want to move to Is there a way to switch to unstyled mode but keep the current Lara look initially, and then gradually replace styles? From what I see, unstyled removes all theme CSS, so it looks like this isn’t possible out of the box. Has anyone done a gradual migration from styled → unstyled? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Your reading is right: switching the app to PrimeNG's unstyled mode deliberately removes the theme CSS variables and component rule sets. The built-in presets, including Lara-style presets, belong to the styled theming path. So there is no built-in switch that says "unstyled, but keep Lara for now." For a gradual migration, I would keep the app in styled mode first and opt individual components into unstyled mode with the per-component |
Beta Was this translation helpful? Give feedback.
Your reading is right: switching the app to
unstyled: truewill not keep the Lara look.PrimeNG's unstyled mode deliberately removes the theme CSS variables and component rule sets. The built-in presets, including Lara-style presets, belong to the styled theming path. So there is no built-in switch that says "unstyled, but keep Lara for now."
For a gradual migration, I would keep the app in styled mode first and opt individual components into unstyled mode with the per-component
unstyledinput while you add replacement CSS for those components. Once enough of the surface is covered, flip the global setting. If you need the Lara appearance during the transition, use the Lara preset as a vi…