Skip to content

Commit e7eea6e

Browse files
committed
docs
1 parent 3eb31d6 commit e7eea6e

1 file changed

Lines changed: 49 additions & 1 deletion

File tree

docs/guide/schema-extensions.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,55 @@ All `x-*` attributes are optional. QuickForms works perfectly with standard JSON
8484
- User-friendly labels for technical values
8585
- Internationalization of enum options
8686
- 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.
88136

89137
---
90138

0 commit comments

Comments
 (0)