In the Salesforce user interface, the Display Density setting lets users choose how densely the content is displayed. … Display density is supported for lightning-input-field and lightning-output-field within the form; display density is not supported for custom components within the form.