
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@10up/block-components
Advanced tools
A collection of components built to be used in the block editor.
A collection of components built to be used in the block editor. These components do not include any build files and do not bundle the WordPress components. Therefore these need to be used in an environment where the Dependency Extraction Webpack Plugin
is used and the import { component } from '@wordpress/package';
is supported. If your project is using 10up-toolkit, this is handled automatically.
npm install --save @10up/block-components
within your WordPress theme or plugin.import { ContentPicker } from '@10up/block-components';
As of v1.20.6, you can now import individual modules directly to reduce bundle size.
Instead of importing from the base entry point:
import { ContentPicker } from '@10up/block-components';
import { useAllTerms } from '@10up/block-components';
import { registerBlockExtension } from '@10up/block-components';
import { iconStore } from '@10up/block-components';
You can import components
, hooks
, apis
, and stores
individually from their specific paths:
import { ContentPicker } from '@10up/block-components/components/content-picker';
import { useAllTerms } from '@10up/block-components/hooks/use-all-terms';
import { registerBlockExtension } from '@10up/block-components/api/register-block-extension';
import { iconStore } from '@10up/block-components/stores/icons';
This approach offers improved tree-shaking and results in smaller bundles, especially when only using a subset of the library.
The original import paths are still fully supported and will continue to work as expected.
DEPRECATED
These components read/write information from the global post object or a PostContext
.
These hooks read/write information from the global post object or a PostContext
.
Active: 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.
Please read CODE_OF_CONDUCT.md for details on our code of conduct and CONTRIBUTING.md for details on the process for submitting pull requests to us.
FAQs
10up Components built for the WordPress Block Editor.
We found that @10up/block-components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers 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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.