I recorded a short video that demonstrates the web component, which goes over the current features (sorry for the low audio volume): card-prototype-demo.mov - Google Drive
I’m hoping to gather early feedback before you can actually use it for real in your projects, so feel free to comment on anything related to this: features, visuals, API, how you would envision the Flow or React API working, or something else that comes to mind.
A couple of features I still have on the table:
A slot where you can put a link or a button which is hidden but allows the card itself to act as a click target.
CSS container query that triggers the card layout from horizontal to vertical when there’s not enough space.
Very nice!
I also liked the video demonstrating the versatility of it (very impressive by the way), but it’s a shame I couldn’t hear you over my laptop fans spinning, and I was not willing to put on my headphones.
Nice work! A card component is long overdue. People always start out thinking it’s going to be as simple as slapping a couple of class names on a div, but as you show, there’s more to it if you want something that’s nice looking and flexible.
Yes, you can put cards in a CSS grid layout like that. But the Card component itself doesn’t give you that layout. The Card component is only the layout of a single card.
var kanbanBoard = new KanbanBoard("my board", "backgroud-aurora-theme");
var kanbanColumn = new KanbanColumn("to do list");
var card = new Card("my task", "backgroud-photo-Snow-Reindeer");
kanbanColumn.addCard(card);
kanbanBoard.addColumn(kanbanColumn);
kanbanBoard.refresh();
We are making extensive use of “tiles” in our application, which is exactly what you are showing, but less fancy and with mimimum configuration options, so we would be so glad to adopt the official component. We use our tiles in combination with the board, so we overcome the space issue with the board folding. As for the additional feature to make the card act as a click target, we definitely upvote that.
Is it available in some prereleased version?
Could we have an example of how the component would be used in Flow?
The rudimentary version (just a simple container, no slots) is available in 24.6 behind a flag. The version with the slots which I show in the video is in code review. But that’s only the web component.
Could we have an example of how the component would be used in Flow?
Thanks, that looks great! I’m not sure how we should support that kind of a pattern. It’s a combination of Card and Details, but I’m not sure how those should be composed together.