I'm a Rive user and can do the n-slicing, but its actually really over engineered when you can actually do this nicely and have it animate and progressively enhance with pure CSS and HTML - eliminating the need to have to load any scripts.
I'd be interested to see performance impact of Rive vs native.