Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some elements can occupy more than one column #90

Open
dbasibuyuk opened this issue May 12, 2023 · 0 comments
Open

some elements can occupy more than one column #90

dbasibuyuk opened this issue May 12, 2023 · 0 comments

Comments

@dbasibuyuk
Copy link

dbasibuyuk commented May 12, 2023

Hey,

Is is possible to tell to any specific element that it can occupy 2 or 3 columns instead of 1?

Here is my code snippet

      <Masonry
        breakpointCols={3}
        className="my-masonry-grid"
        columnClassName="my-masonry-grid_column"
      >
        {itemData.map((item) => (
          <Box position={"relative"} sx={{ aspectRatio: item.aspectRatio }}>
            <Image
              key={item.img}
              src={item.img}
              alt={item.alt}
              fill
              style={{ objectFit: "cover" }}
            />
          </Box>
        ))}
      </Masonry>
    </Box>```
    
    For example, first image takes 2 column, the others still remains in 1 column.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant