Fields
Components for displaying and grouping properties, parameters, and field documentation.
Overview
The Field components provide a consistent way to document properties, parameters, and fields in your content. They include two main components: Field
for individual items and FieldGroup
for organizing multiple fields together.
Components
Field Component
The Field component displays individual properties or parameters with their types, requirements, and descriptions.
The user's unique identifier. Must be between 3 and 20 characters.
With Default Value
The color theme for the component. Supports light or dark modes.
With Rich Content
Supports markdown formatting with:
- Lists
- Emphasis
code
FieldGroup Component
The FieldGroup component organizes multiple fields into a cohesive list.
The name of the configuration.
Whether the feature is enabled.
Additional configuration options.
Props
Field Props
The name of the field, property, or parameter.
The data type of the field (e.g., string, number, boolean, etc.).
Indicates if the field is required.
The default value of the field, if any.
Additional classes to apply to the field container.
FieldGroup Props
Additional classes to apply to the group container.
Slots
Field Slots
The description content for the field. Supports Markdown formatting.
FieldGroup Slots
Container for Field components.
Best Practices
- Field Documentation:
- Use clear and concise names
- Provide detailed type information
- Include default values when applicable
- Write descriptive explanations
- Organization:
- Group related fields together
- Use consistent formatting
- Order fields logically (required first)
- Maintain consistent documentation style
- Content Writing:
- Use markdown for rich formatting
- Include examples when helpful
- Document edge cases and limitations
- Keep descriptions focused and clear
- Accessibility:
- Use proper heading hierarchy
- Write descriptive field names
- Ensure color contrast for required indicators
- Make documentation screen-reader friendly