Tagging
Auto-Tagging by Naming Layers

Auto-Tagging By Layer Name

With our new "Auto-Tagging by Layer Name" feature, the Locofy plugin further minimises any manual tagging work you need to perform – accelerating your design to code workflow further.

With this feature, you can follow simple naming rules for your Figma layers, and Locofy will automatically tag those layers – without any manual intervention from your side.

Note: Auto-Tagging is only available for web frameworks at the moment.

Layer Naming Syntax

Simply follow this naming syntax to have your elements automatically tagged (added spaces for readability):

[tag name] / [OPTIONAL: tag subtype OR UI library OR "none"] / [OPTIONAL: UI library element variation]

Example:
checkbox/bootstrap/default-checkbox-label

Once you have named all your layers correctly, in Step 2 – Tag interactive elements in the Locofy plugin, you can just toggle the checkbox called "Auto-tag using the layer name" and click "Auto-Tag".

All your correctly named layers will automatically be tagged, and appear under the Tagged tab. You won't need to first accept the recommendation for tagging – Locofy already took care of that.

Examples

Below are some examples on how to automatically tag your elements using Figma layers names.

Example 1 – Button
Tagging a button. Simply name the respective Figma layer as such:

button



Example 2 – Input with Library
Tagging an input, using Material UI's outlined input with an icon. Simply name the respective Figma layer as such:

input/mui/outlined-with-icon



Similarly, tagging an Chakra UI checkbox with a label would work as such:

checkbox/chakra/default-with-label



Note: If you update the layer's name later on (e.g. from _button_ to _input_), and then click on "Auto-Tag" again, the tag will be updated accordingly.
Note: Any changes you make to the tag in the Locofy plugin will permanently override the tags assigned by the layer name.This means that if you manually change the tag in the Locofy plugin by clicking "Change", the tag will be updated accordingly. From now on, if you update the layer name again, the tag **will NOT** be updated based on the layer name. Instead, the manually updated tag from the Locofy plugin will now be maintained, until you untag and change the layer name again in the Locofy plugin.

Appendix – Currently Supported Tags

The following tags are supported in HTML, React, Vue, Next.js, and Gatsby.

TypeLibraryLayer Name
Text-text/a
Text-text/b
Text-text/div
Text-text/h1
Text-text/h2
Text-text/h3
Text-text/h4
Text-text/h5
Text-text/h6
Text-text/i
Text-text/label
Text-text/p
Text-text/span
Text-text/strong
Text-text/blockquote
Text-text/code
Text-text/code
Text-text/legend
Text-text/pre
Text-text/q
Text-text/s
Text-text/small
Text-text/sub
Link-link
Image-image
Button-button
Button-button/none
ButtonMaterial UIbutton/mui/contained-text-icon
ButtonMaterial UIbutton/mui/outlined-text-icon
ButtonMaterial UIbutton/mui/text-icon
ButtonMaterial UIbutton/mui/contained-text
ButtonMaterial UIbutton/mui/outlined-text
ButtonMaterial UIbutton/mui/text
ButtonMaterial UIbutton/mui/icon-only
ButtonAnt Designbutton/antd/primary-text-icon
ButtonAnt Designbutton/antd/default-text-icon
ButtonAnt Designbutton/antd/dashed-text-icon
ButtonAnt Designbutton/antd/text-icon
ButtonAnt Designbutton/antd/primary-text
ButtonAnt Designbutton/antd/default-text
ButtonAnt Designbutton/antd/dashed-text
ButtonAnt Designbutton/antd/text
ButtonAnt Designbutton/antd/primary-icon-only
ButtonAnt Designbutton/antd/default-icon-only
ButtonAnt Designbutton/antd/dashed-icon-only
ButtonAnt Designbutton/antd/text-icon-only
ButtonBootstrapbutton/bootstrap/default
ButtonBootstrapbutton/bootstrap/outline
ButtonChakra UIbutton/chakra/solid
ButtonChakra UIbutton/chakra/outline
ButtonChakra UIbutton/chakra/ghost
Form-form
Label-label
Textareatextarea
Textareatextarea/none
TextareaMaterial UItextarea/mui/standard
TextareaMaterial UItextarea/mui/filled
TextareaMaterial UItextarea/mui/outlined
TextareaAnt Designtextarea/antd/bordered
TextareaAnt Designtextarea/antd/no-border
TextareaBootstraptextarea/bootstrap/standard
TextareaChakra UItextarea/chakra/outline
TextareaChakra UItextarea/chakra/filled
TextareaChakra UItextarea/chakra/flushed
Input-input
Input-input/none
InputMaterial UIinput/mui/standard
InputMaterial UIinput/mui/filled
InputMaterial UIinput/mui/outlined
InputMaterial UIinput/mui/standard-with-icon
InputMaterial UIinput/mui/filled-with-icon
InputMaterial UIinput/mui/outlined-with-icon
InputAnt Designinput/antd/default
InputAnt Designinput/antd/one-icon
InputAnt Designinput/antd/two-icons
InputBootstrapinput/bootstrap/standard
InputChakra UIinput/chakra/outline
InputChakra UIinput/chakra/filled
InputChakra UIinput/chakra/flushed
Checkbox-checkbox
Checkbox-checkbox/none
CheckboxMaterial UIcheckbox/mui/default-checkbox-label
CheckboxMaterial UIcheckbox/mui/checked-checkbox-label
CheckboxMaterial UIcheckbox/mui/indeterminate-checkbox-label
CheckboxMaterial UIcheckbox/mui/default-checkbox-only
CheckboxMaterial UIcheckbox/mui/checked-checkbox-only
CheckboxMaterial UIcheckbox/mui/indeterminate-checkbox-
CheckboxAnt Designcheckbox/antd/default-checkbox-label
CheckboxAnt Designcheckbox/antd/checked-checkbox-label
CheckboxAnt Designcheckbox/antd/indeterminate-checkbox-label
CheckboxAnt Designcheckbox/antd/default-checkbox-only
CheckboxAnt Designcheckbox/antd/checked-checkbox-only
CheckboxAnt Designcheckbox/antd/indeterminate-checkbox-only
CheckboxBootstrapcheckbox/bootstrap/default-checkbox
CheckboxBootstrapcheckbox/bootstrap/default-checkbox-label
CheckboxChakra UIcheckbox/chakra/default-with-label
CheckboxChakra UIcheckbox/chakra/checked-with-label
CheckboxChakra UIcheckbox/chakra/default
CheckboxChakra UIcheckbox/chakra/checked
Radio-radio
Radio-radio/default
RadioMaterial UIradio/mui/default-radio-label
RadioMaterial UIradio/mui/checked-radio-label
RadioMaterial UIradio/mui/checked-radio-only
RadioMaterial UIradio/mui/checked-radio-only
RadioAnt Designradio/antd/default-radio-label
RadioAnt Designradio/antd/checked-radio-label
RadioAnt Designradio/antd/checked-radio-only
RadioAnt Designradio/antd/checked-radio-only
RadioBootstrapradio/bootstrap/default-radio-label
RadioBootstrapradio/bootstrap/checked-radio-only
RadioChakra UIradio/chakra/default-with-label
RadioChakra UIradio/chakra/checked-with-label
RadioChakra UIradio/chakra/default
RadioChakra UIradio/chakra/checked
File-file
Select-select
Select-select/none
SelectMaterial UIselect/mui/standard
SelectMaterial UIselect/mui/filled
SelectMaterial UIselect/mui/outlined
SelectAnt Designselect/antd/basic
SelectAnt Designselect/antd/search
SelectBootstrapselect/bootstrap/default
SelectChakra UIselect/chakra/outline
SelectChakra UIselect/chakra/filled
SelectChakra UIselect/chakra/flushed
Container-container
Container-container/div
Container-container/article
Container-container/footer
Container-container/header
Container-container/main
Container-container/section
Container-container/nav
Container-container/address
Container-container/aside
Container-container/canvas
Container-container/fieldset
Video-video
Audio-audio
Lottie-lottie
Youtube-youtube
iFrame-iframe
Google Maps-google-maps