open-source-labs / Svelvet

🎛 A Svelte library for building dynamic, infinitely customizable node-based user interfaces and flowcharts
https://svelvet.io
2.59k stars 166 forks source link

Tip for svelte components to add Intelliense hover hint for params. #501

Closed Maxiviper117 closed 7 months ago

Maxiviper117 commented 10 months ago

In any svelte component, you can add this HTML comment to add intellisense hints.

<!-- 
    @component

    ## Example Heading

    @param exampleParam - An example parameter description

 -->

This means you can document all the available props, so use of the lib can see what is available and how to use the props without always going back to the website documentation.

Example

image

Now I get a hint

image

Thus this a can be done with all Svelvet svelte components.