Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
sanity-plugin-user-select-input
Advanced tools
This is a Sanity Studio v3 plugin.
This is a Sanity Studio v3 plugin
Adds a searchable dropdown for all users on the project, and stores their User ID as a string field.
Note: Think of the string as a weak reference. Users can be removed from the project without first checking if their ID is used in any Document. And once removed their ID will remain stored as the field value.
This is not a replacement for creating your schema types like staff
, author
, profile
, person
etc. It's useful for using a single field to link a document to a user. For example a field like brief
, task
, reviewer
etc.
npm install sanity-plugin-user-select-input
Add it as a plugin in sanity.config.ts
(or .js):
// ./sanity.config.ts
import {defineConfig} from 'sanity'
import {userSelect} from 'sanity-plugin-user-select-input'
export default defineConfig({
//...
plugins: [userSelect()],
})
Add a userSelect
type field to any document type. It will act like a string field and so can be extended such as using validation rules such as required
.
defineField({
name: 'userId',
type: 'userSelect',
}),
MIT © Simeon Griggs
This plugin uses @sanity/plugin-kit with default configuration for build & watch scripts.
See Testing a plugin in Sanity Studio on how to run this plugin with hotreload in the studio.
Run "CI & Release" workflow. Make sure to select the main branch and check "Release new version".
Semantic release will only release on configured branches, so it is safe to run release on any branch.
FAQs
> This is a **Sanity Studio v3** plugin.
The npm package sanity-plugin-user-select-input receives a total of 189 weekly downloads. As such, sanity-plugin-user-select-input popularity was classified as not popular.
We found that sanity-plugin-user-select-input demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.