ParamField
Documents a request parameter — path, query, or body — with type, requirement status, and description.
For isolated previews, theme switching, and sandbox editing, open the ParamField playground on holydocs.com .
When to use
Use this component when endpoint documentation needs explicit request, response, schema, or lifecycle metadata.
Live Examples
Every example below renders the real component directly inside HolyDocs, followed by the exact MDX you can paste into a page.
Required
A required body parameter.
The display name of the project. Must be between 3 and 64 characters.
mdx<ParamField name="name" type="string" required location="body"> The display name of the project. Must be between 3 and 64 characters.</ParamField>
Optional
An optional parameter with a default value.
Visual theme applied to the rendered doc site. Defaults to default.
mdx<ParamField name="theme" type="string" location="query"> Visual theme applied to the rendered doc site. Defaults to `default`.</ParamField>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | param | Parameter name as it appears in the API request. |
type | string | string | Data type of the parameter (e.g. string, number, boolean). |
required | boolean | false | Marks the parameter as required. |
location | 'path' | 'query' | 'header' | 'body' | — | Where the parameter appears in the request. |
Usage
Start from this baseline shape and then tailor the copy, data, or nesting to the page you are writing.
mdx<ParamField name="name" type="string" required location="body"> The display name of the project. Must be between 3 and 64 characters.</ParamField>
Tips
- Keep naming and ordering consistent across fields, examples, and lifecycle notes so readers do not have to re-parse the endpoint surface on every page.
- Document the happy path and the sharp edges together. Request shape alone is not enough without auth, errors, and retry guidance.
- If a component renders into the right panel, verify the page on desktop width so you can confirm the supporting example is visible where readers expect it.
Related Components
Documents a field in an API response body with its name, type, and description.
More
- Interactive playground: ParamField on holydocs.com
- Component library index: /components