Skip to content

Documentation for the Interactivity API - Tracking Issue #53296

Open

Description

@juanmaguitar

Interactivity API is a proposal for a new standard to create interactive blocks. It's still in an experimental phase and is available with Gutenberg 16.2 or later

This tracking issue compiles all issues related to the documentation of the Interactivity API to keep track of the pending tasks and to ease the coordination of this work.

Interactivity API Docs are currently being created as Markdown files in the /docs folder of the interactivity package . When the Interactivity API is no longer in an experimental phase or is integrated into WordPress Core, the plan is to move this documentation to the Block Editor HandBook

If you are willing to help with the documentation, please add a comment to #51928, and we'll coordinate everyone's efforts.

Tasks

Tasks related to Interactivity API Docs are labelled with [Feature] Interactivity API] & [Type] Developer Documentation]

Activity

  1. self-assigned this
    on Aug 3, 2023
  2. juanmaguitar commented on Nov 29, 2023

    @juanmaguitar
    ContributorAuthor
  3. luisherranz commented on Jan 26, 2024

    @luisherranz
    Member

    This is the list of APIs that in my opinion would cover the whole spectrum of what the Interactivity API encompasses:

    It would be great to review it and start adding the missing items so this is ready before the WP 6.5 Release Candidate 1.

    Reference API

    • Blocks
      • supports.interactivity
      • supports.interactivity.clientNavigation
    • Directives
      • Framework
        • data-wp-interactive
        • data-wp-ignore
        • data-wp-key
      • State
        • data-wp-context
      • Attributes
        • data-wp-bind--{attribute}
        • data-wp-class--{className}
        • data-wp-style--{styleProperty}
      • Inner content
        • data-wp-text
      • Event listeners
        • data-wp-on--{event}
        • data-wp-on-window--{event}
        • data-wp-on-window--{event}
      • Side effects
        • data-wp-init
        • data-wp-watch
        • data-wp-run
          • Hooks
            • useInit()
            • useWatch()
            • useEffect()
            • useLayoutEffect()
            • useCallback()
            • useMemo()
            • useState()
            • useRef()
      • Templating
        • data-wp-each
          • data-wp-each-child
    • Store
      • Client
        • store()
        • getContext()
        • getElement()
        • getConfig()
        • withScope()
      • Server
        • wp_interactivity_state()
        • wp_interactivity_config()
      • Private and read-only stores
    • Router
      • Store - core/router
        • state.url
        • actions.navigate()
        • actions.prefetch()
      • Directives
        • data-wp-router-region

    The Core Concepts guides are optional and could be released after WP 6.5, but they would be a good addition to understanding the mental model behind the Interactivity API.

    Core Concepts

    • Namespaces
    • State
      • Local, global, derived state
      • Server state -> Client state
    • Server directive processing
    • Declarative vs imperative code (don't mutate the DOM manually!)
    • Client-side navigation

    The readmes should be updated to point to the official documentation, the getting started guide and the Interactivity API discussions for questions.

    Readmes

    • @wordpress/interactivity package
    • @wordpress/interactivity-router package
  4. karstengresch commented on Apr 16, 2024

    @karstengresch

    As a dev user, I'd love to see a full CRUD example (with dynamic form submission) walkthrough, such as https://learn.wordpress.org/course/using-the-wordpress-data-layer/ b.t.w. :)

  5. juanmaguitar commented on Apr 29, 2024

    @juanmaguitar
    ContributorAuthor
  6. juanmaguitar commented on May 28, 2024

    @juanmaguitar
    ContributorAuthor

    I have opened #62055 to review and update the README of the @wordpress/interactivity-router package

  7. WPLake commented on Jun 5, 2024

    @WPLake

    @juanmaguitar The current format of the Interactivity API Docs is well-suited for developers with some experience in Gutenberg blocks. However, it lacks basic explanations and a separate guide on how to apply this outside of Gutenberg. We've posted a detailed explanation in our blog that aims to fill the gaps. Wouldn't it be useful to mention this article in the Docs & Examples section?

  8. juanmaguitar commented on Jun 5, 2024

    @juanmaguitar
    ContributorAuthor

    Wow! That post is great! Congratulations @WPLake 🙌

    WordPress Docs does have a external linking policy that doesn't allow to link resources outside of wordpress.org (with some exceptions), but I would love that some of the explanations and ideas that are covered in your article are also included in the official docs.

    Would you like to help shape and improve the official docs?
    If so, the best next step would be opening an issue detailing the specific improvements you'd like to see in the docs.
    I'd also be happy to connect via Make WordPress Slack (@JuanMa) to discuss any other ways to collaborate to improve the iAPI docs.

  9. WPLake commented on Jun 27, 2024

    @WPLake

    @juanmaguitar I'm also open to collaboration on the iAPI Docs. I wrote you in Slack DM (@juanma from WPLake) on 18th June. Should we rather chat by email?

  10. juanmaguitar commented on Jun 27, 2024

    @juanmaguitar
    ContributorAuthor

    @WPLake, I apologize for the delay in getting back to you.
    I've been intensely focused lately on the Docs Squad work for WP 6.6 release 😅
    I actually had my response in draft form, but I wanted to provide some background GitHub issues to frame our conversation. I finally completed that today, so I'm happy to continue the discussion via Slack. I'll ping you there today.

  11. juanmaguitar commented on Jul 15, 2024

    @juanmaguitar
    ContributorAuthor

    The issue #63570 has been created and added to the list in the description of this issue

  12. luisherranz commented on Jul 17, 2024

    @luisherranz
    Member
  13. DAreRodz commented on Jan 27, 2026

    @DAreRodz
    Contributor

    👋 @juanmaguitar, I'm revisiting this issue.

    From the issues that appear in the description, I closed #62055 as completed.

    Regarding #56638, not sure if it still applies; I think it could be closed. It seems like most of the related docs are already present in the iAPI router's README.md file. I guess we can expand on client-side navigation as part of #62921 in a new document under the /docs/reference-guides/interactivity-api/ folder. 🤔

    And regarding #62920, do you still think it is required? It would involve changing the overall structure of the documentation. Maybe it is not worth it to go for that change.

  14. DAreRodz commented on Jan 27, 2026

    @DAreRodz
    Contributor

    @juanmaguitar, forgot to mention, I created the following PR for #61207:

    The issue is not listed above, though I thought it was still relevant. Let me know if that's not the case.

  15. DAreRodz commented on Feb 12, 2026

    @DAreRodz
    Contributor

    @juanmaguitar, I created this PR to fix a typo in one of the iAPI guides' file names, just so you are aware:

  16. DAreRodz commented on Feb 16, 2026

    @DAreRodz
    Contributor

    The previously mentioned PR was superseded by #75357. I approved it and it's ready to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions