Extra text added to ID's and Classes

Please don’t add any extra text to ID’s and Classes.

My artboard is labeled “main”, but in the exported code, it says id="main_A0". It needs to just be id="main".

That’s a bug and it has to do specifically with Artboards. The ids are only supposed to be renamed if they have been used before and it’s that way so that the page renders correctly.

Whenever an element is renamed a note is added to the export messages. You can see a list of these when you export click the Messages button. This button appears after an export.

The extra text added to the artboard id will probably be addressed in the next release.

Good to know!

Artboard IDs are now reserved as of version 2.2+. However artboards cannot use the same ID or name even though XD allows you to have two artboards with the same name.

Duplicate IDs will continue to be shown in the messages after export.

Artboard elements will use the ID provided first but any ids or names that are already used will be renamed to prevent the page from breaking. The ID is how the styles are applied unless “Style via classes” is selected.

A future update may provide feedback when entering an id if the id is already used.