woylie
I released Doggo, a collection of unstyled Phoenix components.
https://github.com/woylie/doggo
Features
- Unstyled Phoenix components.
- Storybook that can be added to your application, so that you can see the component with your own styles.
Goals
- Follow proper HTML semantics.
- Adhere to accessibility guidelines with appropriate ARIA attributes and roles.
- Favor semantic HTML and ARIA attributes over CSS classes for style bindings to states, if possible.
- The library is comes without default styles and does not prefer any particular CSS framework.
Why did I build it?
- I regularly bootstrap new projects and needed a component library to quickly replace Phoenix’s tailwind-based components.
- I prefer to solve UI problems once and use the solutions across projects.
- I’m very comfortable writing my own CSS/SCSS and feel like I outgrow any CSS framework at some point in a project’s lifecycle.
What’s next?
- Add stories for components that are not covered in the storybook yet.
- Complete the base component set (#20).
- Implement remaining APG patterns (#139).
- Add keyboard interaction (#136).
- Improve conformance to WAI-ARIA and WCAG.
So far, all components are plain Phoenix components without any JavaScript. For some accessibility patterns, especially those involving keyboard interaction, it may be necessary to introduce some JavaScript in the future. I might also consider introducing more complex (live) components.
Trending in Announcing
Hey everyone!
Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application.
This library uses Erlang esaml to provide
plug enabl...
New
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi all!
I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas.
You...
New
Hello
Published a new library - ProcessHub!
ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
This showed up on my feed.. anyone heard of it? Just hype?
Ox Alpha is a reasoning model designed for coding, sustained ag...
New
It’s not that it’s vocabulary is too advanced. It’s something worse.
I get lost trying to follow even a paragraph written by Claude. It’...
New
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
Introductory paragraph
I’ll be looking for a keen junior or someone that has a couple of years experience in the real world (so you’ve be...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #blog-post
- #ai
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
sodapopcan
Nice! Big fan of your work so I’m looking forward to reading through this.
trentjones21
Looks cool! Do I need to do anything to generate the storybook components? I went through the installation process, but the Doggo Storybook page doesn’t have any components.
When I run
I get the error
I’m probably missing something obvious
Edit: I downloaded the source and manually copied the contents of
privinto the build folder and that fixes the storybook file. Not sure what the right way to get it there is though.woylie
I forgot to add the folder to the hex package. It should work in 0.1.3, can you try again?
lubien
Awesome work
trentjones21
Looks like that worked!
adw632
I have written many times my struggles on here that web UI is a huge gap and undermines Phoenix as a viable way to build apps fast. Phoenix isn’t fast vs other solutions which have established UI frameworks.
A set of semantic headless components that address accessibility is the missing piece in the ecosystem and now, with Doggo you have made great strides to closing that gap. Well done and thank-you for your efforts.
I’ve actually moved to using web components / custom elements because of this gap (Shoelace and Adobe Spectrum with the what looks to be amazing Spectrum 2 just around the corner).
IMO Doggo should be seriously considered by the Phoenix core team as a foundation library given there is nothing other than the “stop gap” core components which are not fit for purpose and create a maintenance issue for phoenix apps.
If Phoenix had a set of core semantic components which implement all the accessibility requirements correctly and cover the common application use cases then tools, generators, CSS frameworks, themes, application website templates, UI design/figma templates, and real storybook collaboration with design teams can thrive within the Phoenix ecosystem.
Without a core semantic UI component library Phoenix and liveview will remain a fringe hobby web technology with low adoption because the gap between UI design teams and dev teams is too large as they cant work effectively or efficiently together. Phoenix in effect slows you down vs just using react or next.js or any other popular solution that has established UI components and real storybook support out of the box to close the gap between design intent and devs.
woylie
With version 0.2, all components are covered in the storybook. It also introduces three new components:
adw632
Have you looked at bits-ui for inspiration in terms of structuring your headless UI components.
Bits-ui is a headless UI for accessibility concerns and is what shadcn-svelte is built on.
Some feedback:
woylie
Thanks for the feedback! I put the items on my to-do list for further consideration. I wasn’t familiar with bits-ui, I’ll definitely check it out.
In general, the goal is to define sensible primitives while still allowing the user to add further customization. The drawer component for example has three slots, but it doesn’t make any assumptions about the content of those slots. You could just use the
:topslot and put any content in there, you’re not bound to the otherdrawer_*components. To reflect top/right/bottom/left drawers, you can add your own modifier classes (just as an example, I might consider adding a separate attribute for this in particular).There is an open issue for a generic menu, which will follow the APG menu and menubar pattern.
adw632
Thanks for your start on this important step for the community.
I don’t pretend to be any kind of expert in this, only sharing things that struck me a well designed with good coverage.
I am kind of impressed with what Adobe is doing with Spectrum 2, I think the time of custom elements is now and they will be leading the pack with a solid approach and huge investment as they are betting the farm on it with over 100 apps to be migrated to their web components.
Despite being quite bullish on web components I see incredible value for a semantic UI contract in Phoenix.
My thoughts are that your library could in fact be the start of a completely renderless behaviour module and your current implementation could be just one rendition of the html. With the right abstraction it should be possible to back the semantic UI onto your current rendition, Shoelace, Adobe Spectrum or something else entirely, even a native UI.