# react-example-minimal

> Minimal editor setup with basic functionality.

A shadcn/ui block from the [@prosekit](https://prosekit.dev) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/prosekit/react-example-minimal).

- Page, with a live preview: https://shadcn.exchange/r/prosekit/react-example-minimal
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/prosekit/react-example-minimal-light-9e3642b75fb44c87.png
- Registry item: https://prosekit.dev/r/react-example-minimal.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://prosekit.dev/r/react-example-minimal.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `prosekit`

## Files

### `registry/src/react/examples/minimal/editor.tsx`

```tsx
'use client'

import 'prosekit/basic/style.css'
import 'prosekit/basic/typography.css'

import { defineBasicExtension } from 'prosekit/basic'
import { createEditor } from 'prosekit/core'
import { ProseKit } from 'prosekit/react'
import { useMemo } from 'react'

export default function Editor() {
  const editor = useMemo(() => {
    const extension = defineBasicExtension()
    return createEditor({ extension })
  }, [])

  return (
    <ProseKit editor={editor}>
      <div ref={editor.mount} className="outline-solid p-4"></div>
    </ProseKit>
  )
}
```

### `registry/src/react/examples/minimal/index.ts`

```ts
export { default as ExampleEditor } from './editor.tsx'
```
