The Slider attribute adds the Elementor Slider control to your widget: a range slider with a number field. You use it for sizes like a width, a height, a gap or an icon size. The widget applies the value to the elements you choose with a CSS selector, and you can also output the value in the HTML.
Slider is a Pro attribute, so you need Unlimited Elements Pro to use it.
Step 1
Open the widget in the Widget Creator. In your WordPress dashboard, go to Unlimited Elements > Widgets and click Add Widget to create a new widget. To change one of your own widgets, hover over it and click the Edit Widget (pencil) icon.
Step 2
Open the Attributes tab. On the left, select the section where the attribute should appear: sections under Content are shown in the Content tab of the Elementor panel, and sections under Style in the Style tab. Slider usually goes in a section under Style. Then click Add Attribute.
Step 3
Click Attribute Type and choose Slider in the Basic column.
Step 4
Fill in the attribute settings:
- Title: the label of the slider in the Elementor panel.
- Name: the name you use in the widget code. It is filled in from the title, for example
item_width. - Enable Condition: shows the slider only when another attribute has a chosen value. Select that attribute in Show When.
- Default Value: the starting value of the slider.
- Min, Max and Step: the range of the slider and how much the value changes with each step. If you allow more than one unit, Min and Max apply to px only, as the dialog notes.
- Units: the units you can choose in the Elementor panel, for example PX only, or PX, %, EM.
- Responsive Control: lets you set different values for desktop, tablet and mobile. When you select it, you can enter Default Value – Tablet and Default Value – Mobile.
- CSS Selector and CSS Selector Value: the element and the CSS rule it gets, for example
.ue-itemandwidth: {{SIZE}}{{UNIT}};.{{SIZE}}is the number and{{UNIT}}is the unit. The selector works only inside this widget. - Show More Selectors: adds CSS Selector 2 and CSS Selector 3, each with its own value.
Step 5
Open the HTML tab. If you use the CSS selector, add its class to your element, for example <div class="ue-item">{{title}}</div>.
You can also output the value in the HTML: {{item_width}} gives the number with the unit, for example 20px, {{item_width_nounit}} gives only the number, and {{item_width_unit}} gives only the unit. With Responsive Control, {{item_width_tablet}} and {{item_width_mobile}} give the tablet and mobile values.
Step 6
Click Update to save the widget. In the Elementor editor, the slider appears in the section you selected in Step 2. Drag the slider or type a number. If you allowed more than one unit, choose the unit in the top right corner of the control. The screenshot shows the Icon Size and Icon Spacing sliders of the List widget.