I used lightning-layout
for my UI by giving a size 3
. I have an 8
button on-screen suppose when I did not allow a user from a specific button then the UI can not rearrange. Check the sample code.
<div class="slds-m-around_x-small slds-theme_shade">
<lightning-layout horizontal-align="space">
<template if:true={isCustomerCareAccess}>
<lightning-layout-item padding="around-small" size="3" onclick={cutomerCareTemplate}>
<div class="slds-box slds-p-left_xxx-small slds-theme_default card">
<img src={customerImag} style="width: 30px;height:30px">
<label class="slds-form-element__label" for="form-element-01">
<span style="font-size: 15px;">{label.CustomerCare}</span>
</label>
</div>
</lightning-layout-item>
</template>
<template if:true={isDataAccess}>
<lightning-layout-item padding="around-small" size="3" onclick={dataReportReqTemplate}>
<div class="slds-box slds-p-left_xxx-small slds-theme_default card">
<img src={DataReportImg} style="width: 30px;height:30px">
<label class="slds-form-element__label" for="form-element-01">
<span class="slds-m-left_x-small" style="font-size: 15px;">{label.DateAndReport}</span>
</label>
</div>
</lightning-layout-item>
</template>
<template if:true={isFinanceTechAccess}>
<lightning-layout-item padding="around-small" size="3">
<div class="slds-box slds-p-left_xxx-small slds-theme_default first">
<img src={finTeachImg} style="width: 30px;height:30px">
<label class="slds-form-element__label" for="form-element-01">
<span class="slds-m-left_x-small" style="font-size: 15px;">{label.FinancialTech}</span>
</label>
</div>
</lightning-layout-item>
</template>