New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@udecode/plate-toggle

Package Overview
Dependencies
Maintainers
0
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@udecode/plate-toggle

Toggle plugin for Plate

  • 45.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Plate toggle plugin

This package implements the toggle plugin for Plate. It's similar to the indent list plugin, in that it relies on the indent of siblings.

Documentation

Check out Toggle.

Ideas to improve this plugin

  1. Adding an option initialValue of open toggleIds and a callback onChange, for instance to store the state of open toggles in local storage and remember the state upon browser refresh.
  2. Adding an option defaultOpen. Currently, toggles are closed on initial rendering.
  3. Adding an option to specify how to get the indent value of elements, right now we are relying on this being the default KEY_ELEMENT from the indent plugin
  4. An option to specify how to get the id of elements, right now we are using the default id attribute from the node-id plugin.
  5. Adding a placeholder below the toggle, like Notion does, when the toggle is expanded without any elements below.
  6. Make toggle button more accessible
  7. When indenting an element right of a closed toggle, it becomes hidden. This makes sense, but a nicer UI would be to open the toggle in that case, like Notion does.

License

MIT

Keywords

FAQs

Package last updated on 25 Feb 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc