Getting Bulma CSS to work with Phoenix LiveView

Joel Kemp
Elixir Learnings
Published in
Nov 17, 2020

Getting the Bulma CSS Framework (v0.9.1 as of this writing) set up with your Phoenix LiveView app only takes a few steps:

  • In your project’s directory, go to the assets folder with cd assets
  • Install bulma using npm: npm install --save bulma
  • Add bulma’s styles to your app’s styles: add the following to the assets/css/app.scss file @import "../node_modules/bulma/bulma.sass"; . Adding that line anywhere should be fine, but at the bottom of the list of imports works well.
  • Add any bulma css classnames to your markup and observe that it inherits the bulma styles.

--

--