question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Card Deck+Columns

See original GitHub issue

Is your feature request related to a problem? Please describe…

I have a page with dynamic elements (anywhere from 1-200 cards) and would like to lay them out in an even grid. Currently if I use columns I’m able to display all of them. If I use deck I’m unable to as they become crunched and unreadable. Here is an example: Columns: columns Deck: deck

Describe the solution you’d like

If you take a look at how semantic accomplishes this you can see they allow you to specify the number of columns and then they’ll use that for creating a nice grid of everything: https://semantic-ui.com/views/card.html

Describe alternatives you’ve considered

I’ve considered using a grid container or dividing my apps into groups of 3 in order to get deck to working well but haven’t come up with a good way yet. I’m open to suggestions though.

Additional context

Add any other context or screenshots about the feature request here.

Here is what code I’m currently using to render the cards:

          <b-card-group deck v-if="contents">
            <b-card
              v-for="app in contents"
              :key="app.id"
              :title="app.title"
              header-bg-variant="white"
              :img-src="app.logo"
              border-variant="secondary"
              style="max-width: 20rem;"
            >
              <b-card-text>
                {{ app.description | truncate(120, '...') }}
              </b-card-text>
              <template v-slot:footer v-if="app.categories">
                  {{ app.categories }}
              </template>
            </b-card>
          </b-card-group>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
SelfhostedProcommented, Jul 10, 2020

This works:

          <b-container fluid>
            <b-row cols="1" cols-sm="2" cols-md="3" cols-lg="4">
              <b-col
                v-for="app in contents"
                :key="app.id"
                col
                no-gutters
                class="mb-2"
              >
                <b-card
                  :title="app.title"
                  :img-src="app.logo"
                  border-variant="secondary"
                  img-width="100%"
                  align="center"
                  class="h-100"
                >
                  <b-card-text>
                    {{ app.description | truncate(50, "...") }}
                  </b-card-text>
                  <template v-slot:footer v-if="app.categories">
                    {{ app.categories }}
                  </template>
                </b-card>
              </b-col>
            </b-row>
          </b-container>

I still think it would be nice to provide an easier way of doing this that’s more responsive (mine can be a bit clunky on different sized screens)

0reactions
stale[bot]commented, Oct 23, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap 4 card-deck with number of columns based on ...
You can manage the number of cards to show/hide in different breakpoints. In Bootstrap 4.1+ columns are same height by default, just make...
Read more >
Cards - Bootstrap
Bootstrap's cards provide a flexible and extensible content container with multiple variants ... Using the grid, wrap cards in columns and rows as...
Read more >
Bootstrap 4 card deck columns per row on Codeply
Bootstrap 4 to create an equal height card layout. The cards in each row are the same height, and take on the height...
Read more >
Bootstrap Card Deck - free examples, templates & tutorial
Use the Bootstrap grid system and its .row-cols classes to control how many grid columns (wrapped around your cards) you show per row....
Read more >
Responsive Card Deck Example - Bootstrap 4 Code Snippet ...
Responsive Card Deck Using Bootstrap 4 Row Column Classes. This example demonstrates how you can use the responsive row classes to quickly build...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found