Is it possible to remove the label on lightning:namespace components?
Yes you can set the variant
attribute to "label-hidden"
, so your code should look like:
<lightning:input type="number" label="number" variant = "label-hidden" name="aNumberInputField"/>
If you still want to use the lightning base components without the labels you can put the display to none and the visibility to hidden like this
.THIS .slds-form-element__label {
display : none;
visibility : hidden;
}
The label
property, for now, is mandatory on that control. It may not be a perfect fit, but the set of <ui:inputXXX>
controls provide very similar functionality without the requirement for a label. You may find that you have to recreate some functionality (depending on your needs), but you'll be very nearly there from the get go.