Metadata

This section contains the metadata properties for the component, such as the component name and who created it.

The following informational metadata properties can be set:

  • name - the name of your component (required)
  • author - name of the author of the component (required, recommended to be your GitHub username)
  • guid - the unique identifier for your component
    • This must be unique
    • A new GUID is created for you when you use one of the templates
    • If you are not using a template, make sure you don't use the GUID from an existing component
  • additionalinformation - any extra information by the author, e.g. a link to their website

Additionally, the following properties affect the behaviour of the component:

  • minsize - the minimum size for your component (assumed to be equal to the grid size if omitted)
  • canresize - whether your component has a fixed size or can be resized by the user (default: true if omitted)

Each piece of metadata is made up of a single <meta> tag, inside the <declaration> tag.

<meta name="(property)" value="(value)" />

Example

The following metadata is from the standard resistor component included with Circuit Diagram.

<!--?xml version="1.0" encoding="utf-8"?-->
<component version="1.2"
               xmlns="http://schemas.circuit-diagram.org/circuitDiagramDocument/2012/component/xml">
  <declaration>
    <meta name="name" value="Resistor" />
    <meta name="guid" value="dab6d52b-51a0-49b0-bc40-3cda966148aa" />
    <meta name="minsize" value="50" />
    <meta name="canresize" value="true" />
    <meta name="canflip" value="true" />
    ...
  </declaration>
  ...
</component>

Next: properties