I have a select in a Magento 2 template initialised using the uiClass with the code below:

], function (Select, $) {
    'use strict';

    return Select.extend({
        initialize: function () {

            $("#" + this.uid).closest('div').css('padding', '10px').css('border', '1px solid red')

Whilst the select appears as expected, I struggle to change its rendering with jquery.

Has anybody resolved this issue?

1 Answer 1


You can add a custom template to your component using the elementTmpl parameter.

More information can be found here: https://devdocs.magento.com/guides/v2.3/ui_comp_guide/components/ui-select.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.