John_Shelby

John_Shelby

Phoenix 1.7 Bootstrap CSS for Core Components

Hello,

When I upgraded to phoenix 1.7, core components with tailwind CSS are now available. Does anyone have rewritten classes for these components in Bootstrap CSS please? I have little experience, I want to use these components, but at the same time I have no idea how to efficiently convert them to Bootsrap CSS.

I knew I couldn’t convert it 1:1, but I was asking for an alternative.

If anyone has a conversion to Bootsrap and shares, I’d appreciate it.

Thank you very much for any help! :slight_smile:

Most Liked

jmnda

jmnda

Hello, I have linked to a repo I was using before I migrated from Bootstrap to Flowbite. The repo has core_components.ex with Bootstrap styles. I have striped away the personal stuff so it’s just a bare dashboard template. I have added some simple LiveViews for Product and ProductCategory to see the components in action.
Repo: GitHub - jmnda-dev/phx-bootstrap-dashboard: A Phoenix framework bootstrap dashboard with Bootstrap styles `core_components` · GitHub

The Modal and some form inputs have some of their styles in the app.scss file. You can follow the ReadMe for setup instructions.
If you have any questions let me know.

7rans

7rans

It shouldn’t be too difficult, just a bit time consuming.

You could start by converting all the tailwind classes to inline styles. With the exception of a few css variables that’s rather straightforward translation. Then you’d have equivalent functionality but no longer need tailwind dependency.

After that you can migrate to bootstrap at your leisure. See Phoenix 1.8 and Bootstrap 5 · FullstackPhoenix for some ideas on this.

simonangatia

simonangatia

Thank you so much. It really helped me.

Where Next?

Popular in Questions Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New

We're in Beta

About us Mission Statement