Under the set settings there is a template dropdown to choose the "rendering template" for the particular set
Maybe there is a separate field for the frontend template vs cp template?
When the bard field is rendered on the backend it gives you a similar interface to ACF with an "eye" preview button
When that button is clicked the bard field sends a background http request to ask the CP to render just that field
The bard field then takes the response from that request and inline inserts it into the editor - effectively rendering the field
Then on the frontend when augmenting the field it could use the same template (or a separate frontend template) to render the set - this would eliminate the need to loop over all the sets like shown in the docs atm - https://statamic.dev/fieldtypes/bard#with-sets
Additional options:
a button in bard to toggle all sets to preview mode
a way to default to edit mode or preview mode for the entire bard editor and/or individual sets
This is a huge request, but I think it would be really valuable to those coming from a more WYSIWYG-like editors like Gutenberg.
With ACF blocks in WP, you can both preview and edit blocks inline in the editor - without having to do a full preview of the page.
Example - https://youtube.com/clip/UgkxOlI4gV7PUmp85Hg-aKoYiNgj7WTOJPS6?si=naMJdNH5TP81sdr2
I could see this working something like so:
Additional options: