The islands architecture encourages small, focused chunks of interactivity within server-rendered web pages. The output of islands is progressively enhanced HTML, with more specificity around how the enhancement occurs. Rather than a single application being in control of full-page rendering, there are multiple entry points. The script for these "islands" of interactivity can be delivered with web components, allowing the rest of the page to be just static HTML.
There are several ways to support the islands architecture for example Stimulus, which I've used on multiple projects.
However all modern browser come with web components built in and as they are pretty simple to use it makes sense to implement client side enhancement using this technology.
An example of a very simple component create the following in
//define a class extending HTMLElement //register the new custom element 'hello-world', HelloWorld
Include the element into your
To use the element