You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/schema-extensions.md
+49-1Lines changed: 49 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,55 @@ All `x-*` attributes are optional. QuickForms works perfectly with standard JSON
84
84
- User-friendly labels for technical values
85
85
- Internationalization of enum options
86
86
- Adding icons/emojis to options
87
-
- Verbose descriptions for enum values
87
+
88
+
---
89
+
90
+
## `x-enum-descriptions`
91
+
92
+
**Purpose:** Add descriptive help text below each enum option in the dropdown
93
+
94
+
**Type:**`Record<string, string>`
95
+
96
+
**Example:**
97
+
```typescript
98
+
{
99
+
outputDetail: {
100
+
type: 'string',
101
+
enum: ['text', 'segments', 'full'],
102
+
title: 'Output Detail',
103
+
'x-enum-labels': {
104
+
text: 'Text',
105
+
segments: 'Segments',
106
+
full: 'Full'
107
+
},
108
+
'x-enum-descriptions': {
109
+
text: 'Only return speech text.',
110
+
segments: 'Speech segments with their start and end times.',
111
+
full: 'Includes text, speech segments, and VTT file.'
112
+
}
113
+
}
114
+
}
115
+
```
116
+
117
+
**Visual representation:**
118
+
```
119
+
[Output Detail ▼]
120
+
Text
121
+
Only return speech text.
122
+
123
+
Segments
124
+
Speech segments with their start and end times.
125
+
126
+
Full
127
+
Includes text, speech segments, and VTT file.
128
+
```
129
+
130
+
**Use Cases:**
131
+
- Explain what each option does
132
+
- Help users make informed choices
133
+
- Provide context for technical options
134
+
135
+
**Note:** Works best when combined with `x-enum-labels` for clear label/description separation. Descriptions are rendered as caption text below each option.
0 commit comments