Skip to content

Commit 517a35c

Browse files
committed
docs: add component comments
1 parent 6aca612 commit 517a35c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,13 @@ 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. Component comments will appear when hovering over a component in your IDE using the [Svelte Language Server](https://github.com/sveltejs/language-tools).
143+
144+
```svelte
145+
<!--
146+
@component
147+
This is a component description.
148+
-->
149+
<h1>Hello world</h1>
150+
```

0 commit comments

Comments
 (0)