Next.js Discord

Discord Forum

learn

Unanswered
Rex posted this in #help-forum
Open in Discord
RexOP
how can i add bootstrp 5 in next app router

9 Replies

last time i used it i imported the [boostrap](https://www.npmjs.com/package/bootstrap) npm package and added the import to root layout file:
import 'bootstrap/dist/css/bootstrap.min.css';


and if you don't want to add the boostrap classes yourself and want components: https://react-bootstrap.github.io/docs/getting-started/introduction
Orinoco Crocodile
Hey @Rex. It seems pretty straight forward. As @riský , you can add the npm package and then add the bootstrap import to your RootLayout file.

You can reference this article: https://frontendshape.com/post/how-to-use-bootstrap-5-in-next-js-13
@Orinoco Crocodile Hey <@1146146894783971328>. It seems pretty straight forward. As <@657067112434499595> , you can add the npm package and then add the bootstrap import to your RootLayout file. You can reference this article: https://frontendshape.com/post/how-to-use-bootstrap-5-in-next-js-13
RexOP
Thanks for help and also i want to mention i am trying to work with reactstrap or react-bootstrap library which has class components in build and that give me error on serviver side. can you help me about how can i yous Reactstrap library in next 13.4
@riský last time i used it i imported the [`boostrap`](<https://www.npmjs.com/package/bootstrap>) npm package and added the import to root layout file: ts import 'bootstrap/dist/css/bootstrap.min.css'; and if you don't want to add the boostrap classes yourself and want components: <https://react-bootstrap.github.io/docs/getting-started/introduction>
RexOP
Thanks for help and also i want to mention i am trying to work with reactstrap or react-bootstrap library which has class components in build and that give me error on serviver side. can you help me about how can i yous Reactstrap library in next 13.4
well what is your error?
RexOP
when i use Container from ReactStrap Library it gives me this error
@Rex when i use Container from ReactStrap Library it gives me this error
Cape lion
You most probably need to define the 'use client' clause at top of the file in which you are using the Container from ReactStrap.
Cape lion
@Rex Its what the error say, you need to use the Container in a Client component which you define by using 'use client' in the file where you put the Container element