Lightning web components come with attributes. For my use case, I do not need all these attributes and I would like to hide them.

For example, the Lightning combobox has some of the following attributes:

            placeholder="Select Progress"
            onchange={handleChange} ></lightning-combobox>

    <p>Selected value is: {value}</p>

When the HTML Generates on the page it always adds an HTML element for the label. This takes up space on the page that I do not want. For my use case, I do not need this element and would like to hide it from the layout.

Within the attributes, is it possible to tell the component to specifically not generate? For example, I would like to set the label attribute to "Hide"

The full SFDC component documentation can be found here

1 Answer 1


You can set the variant attribute as label-hidden. As per the documentation, use label-hidden to hide the label but make it available to assistive technology.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .