2 definitions in this file:
Identifies this document block as an imports spec.
Platform-specific import entries. Each item documents how to import the component on a specific platform or framework. List the primary/recommended platform first.
Min items: 1
References:
importEntry
{
"kind": "imports",
"items": [
{
"platform": "react",
"package": "@acme/ui",
"code": "import { Button } from '@acme/ui'",
"language": "tsx",
"description": "The recommended import path for React applications."
},
{
"platform": "web-component",
"package": "@acme/ui-elements",
"code": "import '@acme/ui-elements/button'",
"language": "js"
}
]
}
The import statement or code snippet. SHOULD be copy-pasteable and ready to use. For multi-line snippets (e.g., install + import), use newlines.
The platform or framework this import applies to (e.g., 'react', 'vue', 'angular', 'svelte', 'web-component', 'ios', 'android'). Use the same platform identifiers as the API document block. When omitted, the import is taken to apply to the single/default platform.
The package or module to install (e.g., '@acme/ui', '@acme/ui-vue', 'AcmeUI'). Include the full package name as it appears in the package manager.
The language or format of the code (e.g., 'tsx', 'js', 'vue', 'swift', 'kotlin'). Omit when obvious from the platform.
Additional context about this import: when to use this path over others, version requirements, or setup prerequisites.
The version in which this import path became available.
References:
richText
[
{
"platform": "react",
"package": "@acme/ui",
"code": "import { Button } from '@acme/ui'",
"language": "tsx",
"description": "The primary, recommended import path for React applications."
},
{
"platform": "vue",
"package": "@acme/ui-vue",
"code": "import { AcButton } from '@acme/ui-vue'",
"language": "vue",
"since": "2.1.0"
},
{
"platform": "web-component",
"package": "@acme/ui-elements",
"code": "import '@acme/ui-elements/button'\n// then use <ac-button> in markup",
"language": "js",
"description": "Framework-agnostic custom element. Registers the <ac-button> tag globally on import."
}
]
Design System Documentation Spec (DSDS) 0.12.0 — Draft Specification
GitHub