Skip to content

Commit 6045028

Browse files
metonymbenmccann
andauthored
docs: add component comments (#7376)
* docs: add component comments * Review: copy on IDE Co-authored-by: Ben McCann <[email protected]> * Review: conventions/brevity Co-authored-by: Ben McCann <[email protected]> --------- Co-authored-by: Ben McCann <[email protected]>
1 parent bf84b5b commit 6045028

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

documentation/docs/02-template-syntax/02-basic-markup.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,12 @@ Comments beginning with `svelte-ignore` disable warnings for the next block of m
138138
<!-- svelte-ignore a11y-autofocus -->
139139
<input bind:value={name} autofocus />
140140
```
141+
142+
You can document components with the `@component` tag. These comments will appear when hovering over a component in IDEs with support such as VS Code with [the Svelte VS Code extension](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).
143+
144+
```svelte
145+
<!--
146+
@component this is a component description
147+
-->
148+
<h1>Hello world</h1>
149+
```

0 commit comments

Comments
 (0)