Skip to content
GaudiGaudi Design System home

Search documentation

Search every page, heading and paragraph.

Code

Article code rendered through the Core CodeBlock: CodeFence maps MDX pre, CodeGroup renders ::: code-group fences as tabs.

MDX@gaudi/design-system/mdx/CodeView 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 Code from '@gaudi/design-system/mdx/Code';

Usage

```tsx title="app/page.tsx" {2} showLineNumbersexport default function Page() {  return <main>Article</main>;}```
::: code-group labels=[pnpm, npm]
```bashpnpm add @gaudi/design-system```
```bashnpm install @gaudi/design-system```
:::

Examples

Playground

Storybook

API

4 props

Accessibility

Fences are keyboard-scrollable regions with a labelled copy button; groups are Gaudi Tabs with roving focus and labelled panels.

Notes

  • Map pre to CodeFence and CodeGroup to CodeGroup in the MDX components; add remarkCode to the remark plugins.