project moodboard
Step 3: Adding Items
System Text-to-Speech Ready
Slide: 0:00 / 0:00
Slide 1 of 0Interactive Deck
Full Lesson Reference
Add color swatches, images, and typography cards to the board.
Where We Are
The grid layout works with placeholder cards. Now let's replace those with real, interactive item types.
Remove Placeholders
terminal
Remove the placeholder cards. The board should start empty.
Items will be added dynamically when the user clicks the toolbar buttons.Color Swatches
terminal
When the user clicks "Add Color," show a color picker dialog.
After they pick a color, add a card to the board that:
- Shows the color as a large swatch (fills most of the card)
- Displays the hex code below the swatch
- Has a small delete button (X) in the corner
- Clicking the swatch copies the hex code to clipboardImage Cards
terminal
When the user clicks "Add Image," show a prompt for an image URL.
After they enter a URL, add a card to the board that:
- Displays the image, scaled to fit the card width
- Shows a loading state while the image loads
- Shows an error state if the URL is invalid
- Has a delete button in the cornerTypography Cards
terminal
When the user clicks "Add Text," show a dialog where they can:
- Enter sample text (default: "The quick brown fox")
- Pick a Google Font name (or use system fonts)
- Choose a size (small, medium, large)
Add a card that displays the text in the chosen font and size.
Include the font name as a small label. Include a delete button.Delete Items
terminal
Make the delete button work on all card types:
- Small X button in the top-right corner of each card
- Hidden by default, appears on hover
- Removes the card from the board with a fade-out animationTest It
- Add a few color swatches with different colors
- Add images using URLs (try a placeholder like picsum.photos)
- Add typography cards with different text and sizes
- Delete a few items
- Mix all three types on the board together
The board should look like an actual mood board.
Checkpoint
- Color swatches add with a color picker
- Image cards load from URLs
- Typography cards display custom text and fonts
- Delete button removes items
- All three types coexist on the grid
What You Learned
- Dynamic DOM creation with JavaScript
- Event listeners and user input dialogs
- Loading and error states for images
- CSS hover effects and transitions
Exercises
- Build all three item types one prompt at a time, testing each before moving to the next — add a color, an image (try a
picsum.photosURL), and a typography card. - Wire up the delete button and confirm it appears on hover and fades the card out; then deliberately enter a broken image URL to verify the error state shows.
- Mix all three card types on one board and judge it as a designer — if it doesn't yet "look like a mood board," send a styling follow-up describing what feels off.