# @gearbox-built/sanity-multi-reference

> A sortable array of reference

Latest version **0.1.0** (published 2023-04-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @gearbox-built/sanity-multi-reference
pnpm add @gearbox-built/sanity-multi-reference
yarn add @gearbox-built/sanity-multi-reference
bun add @gearbox-built/sanity-multi-reference
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2023-04-25 |
| First published | 2023-04-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=14 |
| Dependencies | 2 |
| Unpacked size | 8.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Gearbox Built |
| Maintainers | jpotts77, nkndy, troymcginnis, devinedwards |
| Keywords | sanity, sanity-plugin |

## Links

- npm: https://www.npmjs.com/package/@gearbox-built/sanity-multi-reference
- Repository: https://github.com/gearbox-built/housing
- Homepage: https://github.com/gearbox-built/housing#readme
- Issues: https://github.com/gearbox-built/housing/issues
- npm.io page: https://npm.io/package/@gearbox-built/sanity-multi-reference

## Dependencies (2)

- [@sanity/ui](https://npm.io/package/@sanity/ui.md) ^1.3.0
- [@sanity/incompatible-plugin](https://npm.io/package/@sanity/incompatible-plugin.md) ^1.0.4

## Recent versions

- 0.1.0 (latest) — 2023-04-25

## README

# @gearbox-built/sanity-multi-reference

> This is a **Sanity Studio v3** plugin.

## Installation

```sh
npm install @gearbox-built/sanity-multi-reference
```

or

```sh
yarn add @gearbox-built/sanity-multi-reference
```

## Usage

Add it as a plugin in `sanity.config.ts` (or .js):

```ts
import {defineConfig} from 'sanity'
import MultiReferencePlugin from '@gearbox-built/sanity-multi-reference'

export default defineConfig({
  //...
  plugins: [
    MultiReferencePlugin({
      apiVersion: import.meta.env.SANITY_STUDIO_API_VERSION, // Defaults to 2021-10-21
    }),
  ],
})
```

## Schema

```ts
import {defineField} from 'sanity'


defineField({
  type: 'multiReference',
  name: 'multiReference',
  title: 'Multi Reference',
  options: {
    types: 'movie',
  },
}),

## Args

#### types

Accepts a single string or array of strings. This is the type of document you wish to reference.
eg:

```
options: {
  types: ['movie', 'castMember', 'post'],
},
```

## License

[MIT](LICENSE) © Gearbox Built

## Develop & test

This plugin uses [@sanity/plugin-kit](https://github.com/sanity-io/plugin-kit)
with default configuration for build & watch scripts.

See [Testing a plugin in Sanity Studio](https://github.com/sanity-io/plugin-kit#testing-a-plugin-in-sanity-studio)
on how to run this plugin with hotreload in the studio.

---
_Source: https://npm.io/package/@gearbox-built/sanity-multi-reference · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
