Coder Social home page Coder Social logo

guillaumeisobar / sanity-plugin-autocomplete-tags Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rosnovsky/sanity-plugin-autocomplete-tags

0.0 0.0 0.0 1.3 MB

Creatable autocomplete tag dropdown input fields for Sanity Studio ๐Ÿค“

License: MIT License

JavaScript 100.00%

sanity-plugin-autocomplete-tags's Introduction

Sanity Autocomplete Tags Dropdown Plugin ๐Ÿš€

This plugin creates a custom tags input field for Sanity Studio. This custom input field allows users to type tags, select existing ones from the dropdown or create new ones. This is handy if you want to offer authors an experience of "type, hit Enter, repeat" for adding tags.

Plugin screenshot

How To Use

This plugin is easy to use and set up. All you need is to have Sanity installed, and its folder open in your terminal.

Installation

sanity install autocomplete-tags

That'll do it. Easy, eh? ;)

Configuration

None ๐Ÿ’ƒ

Implementation

Whenever you want to add tags to an item in your schema, just add this snippet

{
  name: 'tags',
  title: 'Tags',
  type: 'tags',
  options: {
    //Locks menu from creating new tags (defaults to false)
    frozen: true,
    //Preset of tags (defaults to empty)
    preload: [{label: "Oranges", value: "oranges"}, {label: "Apples", value: "apples"}],
    //Closes menu after tag selected (defaults to true)
    closeMenuOnSelect: true
  }
}

Yep, that's it.

Contribute

This repo is friendly to beginners and there are some awesome and easy wins available for your first PR. Feel free to install this plugin, poke around and improve it in any way you see feet. Open an issue, pick an existing one, or open a PR right away. Reach out for help, I'd be happy to walk you through your first PR!

Acknowledgements

This plugin is based on React Select, a fantastic select library for React.

sanity-plugin-autocomplete-tags's People

Contributors

rosnovsky avatar renovate-bot avatar plsrd avatar guillaumeisobar avatar wildseansy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.