Aug 7, 2024

Explanation

This component is used to define and explain component usage.

Exemple

Here you can see a chunk of the code for the definition of the tree component

<Definition name="Tree" description="The tree component.">
  <Definition.Prop type="array" path="tree" default="[]" required>
    The actual array of the tree.
  </Definition.Prop>
  <Definition.Prop type="array" path="tree.children">
    The list of children of a directory.
  </Definition.Prop>

  <Definition.Note>For a single file, instead of using an object with a name...</Definition.Note>
</Definition>

Definition

Definition

The definition component.

name
string
Required
The name of the component.
description
string
The Description of the component.
<slot>
HTMLElement
Required
The actual contents of the note.
NOTE :

You can link to a definition component by adding a link to #definition-Definition.name. For exemple, if you have a Definition named test, you can link to it with a link : (link to test)[#definition-test].

Definition.Prop

A prop of the component.

path
string
Required
The "name" of the prop.
<slot>
HTMLElement
Required
The description of the prop.
type
string
Required
The type of the prop.
default
string
The default value of the prop (if it has one).
required
boolean
If the prop is required.

Definition.Note

A note about the component.

<slot>
HTMLElement
Required
The "name" of the prop.
Last updated : Aug 7, 2024