Spx was made to create a coherent element library for busy WordPress developers. With new major page builders being released almost yearly, there are hardly any constants when adapting to the ecosystem of a new builder, leaving countless add-ons and plugins useless when switching tools. As you might have already guessed, spx is here to combat that churn by delivering a single element library using Web Components that is able to work within current and future page builders.
Introduced by Alex Rusell at the Fronteers Conference in 2011, Web Components have since gained traction among web developers to create encapsulated and reusable elements for the web.
They look like that:
For example, the goal could be to create a card component that displays the 'name' attribute in an h1 tag wrapped in a div once executed:
Components behave like standard HTML elements, so you can target them by using CSS:
That's it, for the most part. Let's dive deeper into how spx is utilizing the power of web components.