Widgets in Bolt are small blocks of content, that can be used to display
content. Examples of this are a small list in the sidebar with "Latest entries"
or "The current weather".

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' anymore.

One of the main advantages of these widgets is that they are not dependant on
the page they are displayed on, and as such, they can easily be placed on
different locations and in different themes.

Bolt itself does not come with any widgets, so they are usually added by
extensions, as the site-owner sees fit. A good example to get acquainted with
Widgets is the 'base widget', which can be installed directly from Bolt's
'Extras' menu. More information about the extension can be found on the
Bolt extensions website. The full readme can be found here.

Setting up a widget usually consists of two parts:

Configuring the widget to assign it to a position, being a named area in the
template, where it's allowed to be shown.

Adding a widget position to your template or theme, making the widget show
up in that position.

You are free to choose any name for the position, but it is good practice to
stick with the default names if possible. This way it'll be easier for
developers to use extensions in your theme, without having to dig through the
template code to find which widget areas are defined.

As mentioned before, setting up the widget itself is usually done by the
extension that provides the widget. As such, you should check out the
documentation of the extension in order to set up the widget.

You can style the widget holder and its contents in CSS. However, try to
refrain from doing this too precisely, because you ultimately have no control
over what will be displayed in the widget itself.

At the same time, we urge widget developers to not override used fonts, colors
and text styles unless absolutely necessary. The less you change in the CSS,
the more seemless the widget will integrate in websites. When it comes to
widgets in the frontend, there are not many options to influence what they will
look like, by design:

The template designer merely allows for widgets to be added to the theme.
The developer of the website determines which widgets will be shown where on
the site

The developer of the Widget Extensions makes the widgets work, regardless of
where they are placed.