Skip to content
GaudiGaudi Design System home

Search documentation

Search every page, heading and paragraph.

SchemaDisplay

Read an API endpoint or a JSON Schema: method badge, path with highlighted parameters, and request and response schemas as an expandable property tree.

CoreData Display@gaudi/design-system/core/SchemaDisplayView in StorybookSource

Installation

pnpm add github:ahmadassaf/design-system

Import from @gaudi/design-system. Load @gaudi/design-system/global.css once and add transpilePackages: ['@gaudi/design-system'] in Next.js.

import { SchemaDisplay } from '@gaudi/design-system/core/SchemaDisplay';

Usage

import { SchemaDisplay } from '@gaudi/design-system';
<SchemaDisplay method='GET' path='/posts/{slug}/comments' parameters={[{ name: 'slug', in: 'path', type: 'string' }, { name: 'limit', in: 'query', type: 'integer' }]} responseBody={commentsSchema}/>

Examples

Playground

Storybook

API

10 props

Accessibility

Sections are real headings at headingLevel. Nested objects are disclosure buttons with aria-expanded; required is written out, never colour alone, and parameter highlights keep their braces.