Tokens are a part of lightning component bundle same as component,event bundle. Tokens are holds necessary values of our visual design into named tokens. So we can Define the token values once and reuse them multiple times in our Lightning components CSS style.
Make sure your first tokens bundle should be named defaultTokens.
We can call multiple token throughout default tokens as well.
For Example:-
.THIS .customToken{ padding:token(boxPaddToken);}
.THIS .customToken thead{ background-color:token(tokenBackground); color:token(colorToken);}
.THIS .customToken thead th{padding:token(boxPaddToken); border:token(boxBorderToken) #ccc solid;}
.THIS .customToken tbody td{padding:token(boxPaddToken); border:token(boxBorderToken) #ccc solid;}
.THIS .customToken{ padding:token(boxPaddToken);}
aura:tokens extends="c:myCustomToken"
aura:token name="changeColor" value="green"
aura:token name="TextColor" value="yellow"
aura:tokens
aura:token name="colorToken" value="red" aura:token
aura:token name="boxPaddToken" value="10px" aura:token
aura:token name="boxMarginToken" value="20px" aura:token
aura:token name="boxBorderToken" value="1px" aura:token
aura:token name="tokenBackground" value="#ddd" aura:token
To know more live demo source code in Salesforce lightning, Trigger, Visualforce & LWC, Use this link..
very nice post
ReplyDeleteappriciate
good way.
ReplyDeleteThanks For Sharing The Amazing content. I Will also share with my friends. Great Content thanks a lot.We can call multiple token throughout default tokens as well.
ReplyDeleteVery Nice Content
ReplyDelete5 Internet Approval Site (Do Follow Backlinks)
Thanks For Sharing The Amazing content....
ReplyDeletebuy Google voice number
Twitter pva accounts
Buy Instagram pva accounts
Buy Facebook pva accounts
This is absolutely a nice post
ReplyDelete