Sveld for PropsView Documentation
To document component properties, add TSDoc comments using the
/** ... */ format. In most use cases Sveld will
automatically parse relevant information - including the property name, type, value, and your description.
CssClasses class denotes properties that use Tailwind utility classes. Set this to aid IntelliSense features.
For advanced or custom types, you may need to specify this information. This can be accomplished using the
@type tag with block-style comments. Specify the type in curly brackets immediately following the tag.
Ensure you document Context API
getContext values to provide Intellisense for child components. However, we intentionally
exclude these values from the Props table.
See the Accordion component for a reference using both parent and child components.
Sveld for SlotsView Documentation
Slot documentation is handle via TSDoc block comments at the top of your script tag (by convention). Note that Sveld does not
currently support descriptions for the
default slot. Instead, we recommend you opt for a Usage tab example and
instructions to illustrate the use of this slot.
Sveld for EventsView Documentation
Sveld will automatically document forwarded events. You should not attempt to document these! However, dispatched events may be
documented similar to props - with a TSDocs comment applied directly above the
dispatch() method. Provide the
event response in curly brackets, followed by the event name, a dash, and then the event description.
We cover how to implement the Sveld data in the Documentation Pages section.