Language PreviewDTL is currently in alpha. Explore the language, try the playground, and learn how to use it.Alpha release coming soon.

Metadata

Metadata allows you to attach additional information to tokens, groups, and token sets. This information can be used for documentation, tooling, and organization.

@meta Decorator

Use the @meta decorator to attach custom metadata:

@deprecated Decorator

Mark tokens as deprecated with a message:

@category Decorator

Categorize tokens for organization:

@platform Decorator

Specify which platforms a token is intended for:

Combining Metadata

You can use multiple metadata decorators together:

Use Cases

Documentation

Metadata can be used to generate documentation automatically:

Tooling

IDEs and tools can use metadata to provide better autocomplete and validation:

Organization

Metadata helps organize and filter tokens in large design systems:

Best Practices

  • Be consistent:Use the same metadata structure across your system
  • Keep it relevant:Only add metadata that provides value
  • Document deprecated tokens:Always provide a migration path
  • Use categories wisely:Don't create too many categories