kevinlang
Hey all,
With Phoenix 1.6 just around the corner, I figured I’d make a tutorial on how to add Bulma to a new Phoenix 1.6 project. By leveraging dart_sass and a new Bulma Hex package I created, I was able to do it without having to involve Node or NPM at all!
I know TailwindCSS is where it is at nowadays, but sometimes it is nice to use a CSS library with more ready-made component classes, especially for quick MVPs. ![]()
I hope to make another tutorial for Bootstrap in the next coming days, and make a similar :bootstrap package to make it easy to install without needing Node or NPM.
Enjoy!
Trending in Guides/Tuts
You probably already know that <span>{nil}</span> in a HEEX template produces <span> </span> when rendered. I fin...
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
ICal is a library for interacting with iCalendar data. It parses iCalendars into typed Elixir structs via ICal.from_ics, and can prepare ...
New
Latest Phoenix Threads
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #phoenix_html
- #elixirconf-us
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 9- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
cvkmohan
Very nice tutorial @kevinlang.
A couple of questions.
kevinlang
tgzfrom NPM and copy over thebulma.scssfile andscss/folder. Plus, for better or for worse, Bulma updates pretty infrequently - there has only been 3 releases this past year.package.jsonin the root of the package for the JS part that can be traversed today by ESbuild when you import it in yourapp.js(this is howphoenix_htmlworks for example) in addition to a rootbootstrap.scssfile.With Bootstrap it is definitely tricky with LiveView, and probably beyond the scope of the package I was envisaging - which is to simply be an alternative way to getting assets without using
npm. I’ll have to look over the SurfaceBootstrap library. From what I read here, it seems that even with the removal of the JS dependency from Bootstrap, it is still a bit of a hassle to make work with LiveView.03juan
Hi @kevinlang . Thanks for the tutorial and packages. I have a problem where
@import "bulma";works fine but if I try to customise my bulma payload to only load specific assets, such as@import "bulma/sass/utilities/_all.sass";I see this error in the logs:Any idea what’s going on here? I checked my code against your repo and everything seems fine.
henriquefernandez
When you import bulma using this package, you are importing this file: https://github.com/kevinlang/bulma-elixir/blob/master/bulma.sass
So if you want to use this specific sass file, you should do:
@import "sass/utilities/_all"And not import bulma
03juan
I’ll try that out tomorrow, obrigado Henrique.
What happens if another package in the path also has the same folder structure?
henriquefernandez
I think that if we put
import "./sass"with the “./”, it will search in the relative path, otherwise we get an error.suranyami
@kevinlang It looks like your tutorial is offline.
Any chance you could either:
At the very least, what’s the format for importing it into CSS/SCSS/SASS?
@import "bulma"doesn’t seem to work. Any hints?Also, if you want someone to do some of the grunt work of adding the docs, updating the version to latest and re-releasing, I’m happy to take up the slack.
Thanks in advance.
CharlesIrvine
@kevinlang The link to your tutorial seems to be stale. I get a timeout when trying to access it. Could you repost it somehow. Thanks
kevinlang
@CharlesIrvine
This link should work: Adding Bulma to Phoenix 1.6 | Kevin Lang