• 新闻
  • 主机
  • 主题
  • 插件
  • 论坛
  • 翻译
  • 文档
  • 关于
接入文派生态

区块

区块组件。无需编码。只需点击即可插入内容。

Build without limits

The technology that powers much of the web has never been easier to learn. Blocks allow you to visually interact with any piece of content, with or without code—fueling rich layouts, interactive onboarding, and endless extensibility. As powerful for design as they are for development, but still intuitive enough for newcomers.

创建区块
浏览区块样板

段落

标题

媒体

图片

视频

音频

栏目

文件

WordPress』 secret power

Blocks are the visual foundation of WordPress, and can be used to create and manage every part of your site. They’re also easier than you think. Learn how to edit a block and you learn how to use all of WordPress—without having to write code. For inspiration, check out what others have done with WordPress in the Showcase.

Explore the Showcase

Complete creative control

The WordPress editor is the default way to insert, transform, style, and move your blocks around on a visual canvas thanks to a simple drag-and-drop interface.

Try blocks live
registerBlockType( 'your-first-block/hello-world', {
    edit: function () {
        return <p>Hello world (from the editor)</p>;
    },
    save: function () {
        return <p>Hello world (from the frontend)</p>;
    },
} );

Hello world (from the editor)

Create your own

If you can’t find a block that suits your needs, create your own. Creating a block is as simple as building a React component. Use the  @wordpress/create-block package to jumpstart your creation.

Create a block

Only the beginning

While blocks are powerful on their own, they』re also part of something bigger and can be combined or deployed in various ways. As a unified and open syntax, they’re easily understood by editors, browsers, and even AI. So whoever is editing will find it easy to make vibrant, personalized designs and experiences happen, fast.

  • 创建自定义区块
  • Design block patterns ↗
  • 构建区块主题
  • 部署区块

© 2024

文派开源

·

粤 ICP 备 2023091240 号-5