r/purescript • u/chshersh • Jun 01 '18
Looking for a library to create pretty webpages without need to dive into HTML and CSS
Hello everyone!
I'm working on web application with Haskell as backend. I also want to have frontend and I'm thinking on implementing frontend in PureScript. Since I have almost zero experience in CSS and only basic HTML knowledge, I don't want to spend months on learning all that fun stuff to make pretty webpage design. I don't need anything fancy, just basic label elements, text entry elements, buttons and lists. But I also don't want it to be ugly. So it would be really great if some library, where I can specify UI elements in declarative way, exist! I just want to be able to specify color, size, content, maybe font and create lists (by fetching data from DB, would be great to customize columns of list rows as well). Don't need full customization of everything, some predefined in library template (or even set of templates) is okay.
Could you please suggest such PureScript library or something close to what I want?
Thanks in advance for your help, I really appreciate it!
5
u/saylu Jun 01 '18
If you're using Halogen components, you could leverage this for simple fields:
https://citizennet.github.io/purescript-ocelot/
Source:
https://github.com/citizennet/purescript-ocelot
Or you could use it as an example and take the bits that seem useful.
These are the simple styled HTML blocks (not components):
https://github.com/citizennet/purescript-ocelot/tree/dev/src/Blocks
2
u/guaraqe Jun 01 '18
In the end, CSS is what defines the appearance of the page, so it is hard to bypass. The best you can do to make this easier is to use a framework. I am using bulma in conjunction with Halogen and I like it.
1
u/trenchgun Jun 01 '18
HTML and CSS are simple.