← 返回
未分类 中文

masonry

When the user wants to design, optimize, or audit masonry (Pinterest-style) layouts for content display. Also use when the user mentions "masonry layout," "m...
当用户希望设计、优化或审查用于内容展示的瀑布流(Pinterest 风格)布局时使用;当用户提及“瀑布流布局”“masonry layout”等关键词时也适用。
kostja94 kostja94 来源
未分类 clawhub v1.1.1 2 版本 100000 Key: 无需
★ 0
Stars
📥 490
下载
💾 1
安装
2
版本
#latest

概述

Components: Masonry Layout

Guides masonry layout design for content with varying heights. Masonry stacks items in columns without distinct rows; items fill gaps like a brick wall. Best for image galleries, portfolios, and discovery-focused platforms.

When invoking: On first use, if helpful, open with 1–2 sentences on what this skill covers and why it matters, then provide the main output. On subsequent use or when the user asks to skip, go directly to the main output.

When to Use Masonry

Use masonry whenUse grid when
---------------------------------
Varying heightsEqual-height items
Image-heavy; varied aspect ratiosProducts, templates (consistent)
Gallery, portfolio, showcaseCard grid
Discovery, browsing; visual-firstStructured browsing

See grid for equal-height grid; card for card structure.

Masonry vs Grid vs Bento vs Carousel

LayoutStructureBest for
-----------------------------
GridEqual rows and columns; uniform itemsProducts, templates, features
MasonryColumns; items stack without rows; gaps filledPinterest, Behance; varied content
BentoIntentional sections; predefined sizesHomepage, dashboard; Apple-style
CarouselSlides; one/few visible; swipe/clickTestimonials, logos, featured items; see carousel

Masonry Structure

ElementPurpose
------------------
Columns2–4 columns; fluid or fixed
ItemsVarying heights; natural aspect ratio
GapConsistent horizontal and vertical spacing
OrderTop-to-bottom fill within columns

Implementation

  • CSS columns: column-count; simple, no JS; but items flow top-to-bottom then next column
  • Masonry.js / libraries: True masonry (left-to-right fill); may need JS
  • CSS Grid + grid-auto-flow: dense: Approximate; no JS; see grid for dense grid

Note: Pure masonry can create accessibility challenges (screen reader order); ensure logical DOM order.

SEO Considerations

Masonry + infinite scroll = content not crawlable. Masonry galleries often use infinite scroll or lazy load; crawlers cannot emulate scroll or "Load more" clicks, so content beyond the initial view is not discoverable.

If you useThen
------------------
Infinite scrollProvide paginated component pages with full URLs; implement pushState; see site-crawlability for search-friendly infinite scroll
Lazy loadEnsure content exists in HTML or is reachable via crawlable links
PaginationPrefer for SEO-critical content; crawlers can follow next/prev links

Reference: Google – Infinite scroll search-friendly recommendations

Best Practices

PrinciplePractice
---------------------
Visual-firstThumbnails; minimal text
Aspect ratioPreserve original; avoid forced cropping
Lazy loadMany images; load on scroll
PerformanceMasonry can be heavy; consider grid for simpler cases

Use Cases

Use caseFormatPage Skill
------------------------------
Showcase / GalleryUser work; varied sizesshowcase-page-generator
PortfolioProjects; mixed media
Pinterest-stylePins; discovery
Image-heavy blogBlog with varied imagesblog-page-generator

Related Skills

  • site-crawlability: Infinite scroll SEO; paginated component pages; search-friendly implementation
  • grid: Equal-height grid; when masonry is overkill
  • carousel: Carousel for slides/rotation; when masonry is overkill
  • card: Card structure; masonry often uses cards
  • showcase-page-generator: Gallery masonry
  • image-optimization: Lazy load, aspect ratio, LCP

版本历史

共 2 个版本

  • v1.1.1 当前
    2026-05-03 05:40 安全 安全
  • v1.1.0
    2026-03-30 16:59 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 329 📥 92,567
design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 214 📥 46,205
content-creation

translation

kostja94
当用户需要翻译内容、创建翻译工作流、管理术语或优化翻译质量时使用;也适用于用户提及相关场景。
★ 0 📥 2,775