Goal: give content authors a UI to pick styling variants for a component, instead of hardcoding classes. This is the step that trips up most front-end devs moving into XMC because it lives entirely in the template tree, not in code.
Set up the parameters templateLink to this section
Step 1: Create the Rendering Parameters template
Go to Templates › Project › [site] › [Component]. Add a new folder called 'Rendering Parameters', then create a template inside it with the same name as your component.
Step 2: Give it Standard Values
Select the new template and give it Standard Values.
Step 3: Add the styling fields
Open the template, name the section 'Styling', and add one field per variant option — a Droplist for a fixed set of choices, e.g. ContentAlign, Padding, Margin.
Point each field's Source at the settings item that holds the valid values, using the query: syntax, e.g.
query:$siteMedia.Step 4: Set the base template
From the Content tab of your Rendering Parameters template, set the Base template to Base Rendering Parameters (under Foundation › Experience Accelerator › Presentation › Rendering Parameters). This wires in the standard fields every rendering parameter template needs.
Step 5: Attach it to the rendering
Go to Layout › Renderings › [site] › [component], and set 'Parameters Template' to the template you just built.