Custom component in template Dashboard 2.0

Is it possible to build your own component in template dashboard 2 and use it in this or another template?
For example your own styled button or something that contains simple logic.

The most straightforward way is to include the required styling in a custom CSS class, defined in a "CSS template" (scoped for the current page or all pages).
Another way would be to define the button as a generic "teleport"