Build a Responsive Card
In this project you build a product card that adapts: make it narrower or wider, and its photo stretches, its text wraps, and its height follows. It takes about ten minutes and uses the tools you'll use most.




1. Add the Parts
Start with a new file: File → New Design, or ⌘N.
- Press R and drag a rectangle about 280 wide and 160 tall. It holds the photo.
- Press T, click below the rectangle, and type the name: Ceramic mug. Press Esc.
- Add two more texts below it the same way: a description, such as Hand-thrown in small batches, and keeps your coffee warm for longer, and Add to cart.
Keep the four parts in a column, left edges roughly lined up.


2. Put Them in a Card
- Press ⌘A to select all four parts.
- Press ⇧A. They go into a new frame with auto layout, which places them one after another.
- In the Design panel, under Flow, choose the column button, Vertical layout, if the parts went into a row.
- Set the gap between the parts to 12 and the padding to 20.
- Click + next to Fill to give the card a background, and set Radius to 16.
- Double-click the frame's name in the layers list and name it Card.
3. Let the Parts Stretch
- Set the card's W to 320.
- Select the rectangle. Open the menu in its W field and choose Fill: it takes the card's width, inside the padding.
- Do the same for the name and the description. The description wraps onto new lines instead of running past the card's edge.
The card's height follows its content by itself. Now try it: drag the card's right edge, or type another W. The photo stretches, the description wraps, and the card grows or shrinks to fit.
4. Make a Button
- Select Add to cart and press ⇧A. The text goes into a frame of its own.
- Give that frame a blue fill, padding of 16 across and 10 up and down, and a Radius of 10. Make the text white.
- Press ⌥⌘K to make the button a component, so you can reuse it.
5. Add a Photo
- Select the rectangle and click the color square under Fill.
- Click the image button at the top of the picker, then Choose image to use a picture from your computer, or Stock photo to find one.
The photo fills the rectangle at any width.
6. Check It and Share It
- Open the Lint tab to check the card for problems, such as text that's hard to read.
- Export it as a PNG, or right-click it and choose Copy/Paste as → Copy as PNG to paste into a chat.
- Ask the AI for a variant: "Make a dark version of this card."
Where to Go Next
- Auto Layout: rows, grids, wrapping, and the other ways layers resize.
- Components: variants, properties, and instances.
- Variables: colors and sizes you set once, with dark and light modes.