Custom placeholder markup when leveraging #lazy_builder in elements Using bigpipe.

To avoid blocking page loads for long-lasting API calls, etc, I implement:

$element = [
  '#lazy_builder' =&gt; ['service.admin:method', []],
  '#create_placeholder' =&gt; TRUE,
];


and it works great! The page loads, and once the service returns the render array, it gets popped into the placeholder.

However, the placeholder span is empty and does not provide the user with any useful status. My goal is to have the empty placeholder replaced with a message (i.e. 'Loading data..'). This is proving more difficult than I assumed - I feel like I must be missing something.

My first crack was manually defining the placeholder:

$element = [
  '#markup' =&gt; 'Loading data..',
  '#attached' =&gt; [
    'placeholders' =&gt; [
      'Loading data..' =&gt; [
        '#lazy_builder' =&gt; ['service.admin:method', []],
      ],
    ],
  ],
];


This generates the desired content, but blocks any elements further down of it from loading until the method returns - pausing with half the page rendered. I assume it pushes the lazy_builder into the render process where it isn't as useful for this purpose.

I skimmed through core and couldn't glean any examples of this.

Is there an easy way to add text to the placeholder? This cannot be a novel need.

Warm Regards.
I know this is an old question, but for anyone who stumbles upon it via a search engine (like I did), then the answer is that as of right now, you can't provide custom placeholder markup, but there is a Drupal.org issue with patches that adds this functionality, so it's possible that the feature will eventually be available in the Big Pipe module without a patch.