There is a ->width()
option for cards. How can the height be defined?
3 Answers
Although Nova does not provide a ->height()
method, when you generate a Nova card it creates resources/js/components/Card.vue
automatically (see Nova card documentation)
The Card.vue file allows you to modify the Vue template for the card element. Since Nova uses the Tailwind CSS framework, you should be able to use the Height classes of Tailwind CSS inside Card.vue.

- 1,205
- 1
- 15
- 41
As of now you can only adjust the width of the Card from the Card's php file using the ->width()
method.
When you set the card width to 1/2
contents from the card seems to overflow. I solved the issue by adding the class h-auto
to the <card>
inside the Card.vue
.

- 4,738
- 8
- 41
- 85
I solved this by adding this to my nova theme:
.card-panel {
height: auto !important;
min-height: 150px;
}
Solution originally posted here:
https://github.com/laravel/nova-issues/issues/1014#issuecomment-451355417

- 12,430
- 26
- 76
- 117