How to get layouting with LiveView 1.0?

I walked through the unofficial Getting Started With Phoenix blog to get familiar with the new way of LiveView. Now I am reading the Phoenix book to get a closer look at all other concepts.
But looking at the pictures in this book, there is a huge difference in the layouts of the old renderer and the new LiveView 1.0. In the book, it seems that a list/table is rendered as a table. I wanted to style a link like a button, too. Or render a form as a form.

So, should I add my own css stuff to app.css depending on tailwind? Or should I add a component library such as PhoenixUI or SaladUI? Or am I simply missing some documentation?

Phoenix ships just enough html/css so that the generators work. You’re expected to bring your own frontend beyond that. You an use some existing component library or you can build stuff on your own, that’s completely up to you.

You can choose. Since you’re learning I don’t recommend using another external lib. Just add your custom css to the app.css and go from there.

Phoenix includes TailwindCSS by default.

Imho it is a good fit in between hand crafted css and a full-fledged component lib.

Yes, but I assume I am missing something. The editor view looks ok, but the list view is not layouted at all. But I’ve used < table >. Is the usage of tr/td wrong, then?

You can also use Pico.css, it provides a basic design with semantic HMTL

1 Like

Feel free to use my learnings/testing app as an example with a styled table together with sorting, pagination, filtering. It uses @flop_phoenix, tailwind and tailwind based UI library flowbite .

You can find the guide on flowbite’s site how to install it.

I also got an example of the main menu with flowbite

1 Like