PrimerLive - a collection of LiveView components that implements GitHub's Primer Design System

The last couple of months I’ve been working on a LiveView UI library based on https://primer.style/css/ (the LiveView 0.18 update caused a bit of a rewrite, but made the code a lot easier to work with).

With around 40 components in all, the result is almost at parity with Primer CSS.

It’s been a fun learning experience. Coming from SPA frontend applications, I had several occasions I needed to rethink my approach to make things work the “LiveView way”, but I think I get the hang of it now…

Let me know what you think!

36 Likes

Thanks for sharing. Anxious to check it out.

For my current project, I’m trying to break things out into a proper component system, and having projects like this to reference can be really helpful. :purple_heart:

New URL for the storybook: https://primer-live.org/

2 Likes

Wow this is amazing. What drives the storybook? Is it LIveView Storybook?

Amazing work - it looks fab!

Is there by any chance a way to incorporate it into a project without requiring npm?

At least some of the components require JS. The easiest way to get that into your project is NPM. (like you use mix to get Elixir dependencies). You could do that by hand, but that will be messy.

You can do without JavaScript if you don’t need menus, dialogs or drawers. You’ll still need to include the CSS from primer-live, but you could opt to use a content delivery service such as unpkg: https://unpkg.com/primer-live/dist/primer-live.css or download it and import.

2 Likes

I’ve updated the documentation: Installation and usage - PrimerLive Storybook

5 Likes