How to add custom field only for variant on web?

Please go to the document settings>>Click on add custom fields>>Enter the label name and select variant>>Click on save>>Click on update setting.