Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

How to apply default styles for Components


Level 5

Hi Team,

I want to give some default styels for components, in my template I have some group of styling, where like Alignment group(left,right), another group like(color) so In alignment I want left should be default. I used defaultstyleclass in template but when I change other style color then alignment also changing back how can I rectify this ? 

3 Replies


Community Advisor

I think decoration tag will help you in above scenario.









hope this helps;

Umesh Thakur


Level 5

Hi @Umesh_Thakur thanks, but I'm trying to give for core component so I added new policy and there I'm trying to give default style for a particular policy. So for polices this tag won't work right ?


Community Advisor

Hi @Tessa_learner1 


The default style should help you with this. Can you please check if the other styles that you are adding are having any alignment changes as well? Also, please note that your changes would be overridden on the build if you don't have them in your code.


Hope it helps!

Kiran Vedantam