Before opening an issue, please search for duplicates (opened and closed)
https://github.com/valor-software/ngx-bootstrap/issues
There's no need to open an issue here if you want to ask general question, use StackOverflow or Slack instead
did not find any options. how can i change the modal size.
Using Plunkr, StackBlitz is the best way to show your issue. Issues without link to an example of reproduction might be closed.
You can use one of starter templates:
Plunkr: https://plnkr.co/edit/0NipkZrnckZZROAcnjzB?p=preview
StackBlitz: https://stackblitz.com/edit/ngx-bootstrap?file=app%2Fapp.module.ts
ngx-bootstrap:2.0.5
@musman92 you can use bootstrap classes for modal-dialog: modal-lg - large modal, modal-sm - small modal
@olshansky i found a solution for that.
const initialState = {
id: 12312,
type: "test",
class: "modal-lg"
};
this.bsModalRef = this.modalService.show(AbcComponent, initialState);
now when modal appear it contain class modal-lg, so you can add as many classes as you want
@musman92 you can use bootstrap classes for modal-dialog:
modal-lg- large modal,modal-sm- small modal
But when tried to use this method it won't works...find the snippet below
, {class: 'modal-md'}
@Arruls8 I don't believe that modal-md is a valid size. According to the documentation, it looks like there are only the two sizes, modal-lg and modal-sm
You can declare your own classes in yor css page, e.g:
.my_class{
width: 100%;
}
and then pass it to the component:
const initialState = {
class: "my_class"
};
There are certain limits imposed by min-width and max-width, depending on the size of the window, but in between them you can change the sizes of the modals
Most helpful comment
@olshansky i found a solution for that.
const initialState = { id: 12312, type: "test", class: "modal-lg" }; this.bsModalRef = this.modalService.show(AbcComponent, initialState);now when modal appear it contain class modal-lg, so you can add as many classes as you want