Widgets in Bolt are small blocks of content, that can be used to display content.

By design, the widget has no access to the context of the page it is being
displayed on. This is because a Widget is a small block of content that can be
placed on various locations on a website. This should work regardless of what's
on the page.

Or, to flip it around: If the contents of a widget would change according to
what's on the page, it would become a part of the page itself, and strictly
speaking it wouldn't be considered a 'widget' any more.

Widget asset objects for registration can be created using a Bolt\Asset\Widget\Widget
class.