carousel

GitHub

提供轮播图/滑块布局的设计指南,涵盖适用场景对比、无障碍访问、性能优化及SEO最佳实践,辅助前端界面设计与开发。

skills/components/layout/carousel/SKILL.md kostja94/marketing-skills

触发场景

设计轮播图或滑块布局 优化内容展示组件 审计轮播图可访问性

安装

npx skills add kostja94/marketing-skills --skill carousel -g -y
更多选项

非标准路径

npx skills add https://github.com/kostja94/marketing-skills/tree/main/skills/components/layout/carousel -g -y

不安装直接使用

npx skills use kostja94/marketing-skills@carousel

指定 Agent (Claude Code)

npx skills add kostja94/marketing-skills --skill carousel -a claude-code -g -y

安装 repo 全部 skill

npx skills add kostja94/marketing-skills --all -g -y

预览 repo 内 skill

npx skills add kostja94/marketing-skills --list

SKILL.md

Frontmatter
{
    "name": "carousel",
    "metadata": {
        "version": "1.1.0"
    },
    "description": "When the user wants to design, optimize, or audit carousel\/slider layouts for content display. Also use when the user mentions \"carousel,\" \"slider,\" \"carousel layout,\" \"testimonial carousel,\" \"gallery carousel,\" \"quote carousel,\" \"image slider,\" or \"carousel accessibility.\" For hero-area patterns, use hero-generator."
}

Components: Carousel Layout

Guides carousel (slider) layout design for sequential content display. Carousels show one or few items at a time; users swipe or click to advance. Best when space is limited and multiple items need rotation—testimonials, quotes, logos, gallery highlights.

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 Carousel

Use carousel when Use grid/list when
Limited space Full catalog visible
One focus at a time; rotation desired Browse, compare many items
Testimonials, quotes, logos, featured gallery Products, templates, blog index
Above fold; hero or section highlight Full listing; discovery

See grid for equal-hierarchy display; list for text-heavy scan; masonry for varying-height gallery.

Carousel vs Grid vs List vs Masonry

Layout Structure Best for
Grid Equal rows and columns; all visible Products, templates, features
List Single column; stacked Blog index, docs, search results
Masonry Columns; varying heights Pinterest-style gallery
Carousel Slides; one/few visible; swipe/click Testimonials, logos, featured items

Best Practices

Accessibility

  • Keyboard navigation: Arrow keys to move; Enter/Space to activate; focus visible
  • User control: Don't auto-advance too fast; allow pause; avoid auto-advance if prefers-reduced-motion is set
  • Announcements: Screen reader users need to know current slide and total (e.g., "Slide 2 of 5")
  • Touch targets: ≥44×44px for prev/next buttons on mobile

Performance

  • Lazy load: Load off-screen slides on demand; avoid loading all images upfront
  • Reserve space: Reserve space for slides to avoid layout shift (CLS)

SEO

  • Content in DOM: All carousel content must be in the initial HTML at page load. Google does not simulate clicks; content loaded via AJAX on slide change is not discoverable. Same as tab-accordion.
  • Recommendation: Server-render all slides in HTML; use CSS/JS only to show/hide. See rendering-strategies.

Use Cases

Use case Format Page Skill
Testimonials Quote carousel; multiple testimonials testimonials-generator
Showcase / Gallery Featured items; rotation showcase-page-generator
Press logos "As Seen In" logo strip or quote carousel press-coverage-page-generator
Community Banner carousel below hero community-forum

Related Skills

  • grid: Grid for full catalog; when carousel is too restrictive
  • list: List for text-heavy scan
  • masonry: Masonry for varying-height gallery
  • card: Card structure within carousel slides
  • testimonials-generator: Testimonial carousel; testimonials as content
  • showcase-page-generator: Gallery format options (grid, masonry, carousel)
  • tab-accordion: Similar SEO requirement—content in DOM at load
  • rendering-strategies: SSR, SSG; content in initial HTML for crawlers

版本历史

  • 70987ba 当前 2026-07-06 00:04

同 Skill 集合

skills/analytics/seo/seo-monitoring/SKILL.md
skills/analytics/sources/ai-traffic/SKILL.md
skills/analytics/sources/traffic/SKILL.md
skills/analytics/tracking/SKILL.md
skills/channels/community/community-forum/SKILL.md
skills/channels/community/product-hunt-launch/SKILL.md
skills/channels/distribution/distribution-channels/SKILL.md
skills/channels/owned/email-marketing/SKILL.md
skills/channels/owned/employee-generated-content/SKILL.md
skills/channels/partnerships/affiliate-marketing/SKILL.md
skills/channels/partnerships/creator-program/SKILL.md
skills/channels/partnerships/education-program/SKILL.md
skills/channels/partnerships/influencer-marketing/SKILL.md
skills/channels/partnerships/public-relations/SKILL.md
skills/channels/partnerships/referral-program/SKILL.md
skills/components/branding/favicon/SKILL.md
skills/components/branding/hero/SKILL.md
skills/components/branding/logo/SKILL.md
skills/components/content/tab-accordion/SKILL.md
skills/components/conversion/cta/SKILL.md
skills/components/conversion/newsletter-signup/SKILL.md
skills/components/conversion/popup/SKILL.md
skills/components/conversion/testimonials/SKILL.md
skills/components/conversion/trust-badges/SKILL.md
skills/components/layout/card/SKILL.md
skills/components/layout/grid/SKILL.md
skills/components/layout/list/SKILL.md
skills/components/layout/masonry/SKILL.md
skills/components/navigation/breadcrumb/SKILL.md
skills/components/navigation/footer/SKILL.md
skills/components/navigation/navigation-menu/SKILL.md
skills/components/navigation/sidebar/SKILL.md
skills/components/navigation/toc/SKILL.md
skills/components/utility/social-share/SKILL.md
skills/components/utility/top-banner/SKILL.md
skills/components/utility/url-slug/SKILL.md
skills/content/copywriting/SKILL.md
skills/content/podcast/SKILL.md
skills/content/translation/SKILL.md
skills/content/video/SKILL.md
skills/content/visual-content/SKILL.md
skills/pages/brand/about/SKILL.md
skills/pages/brand/contact/SKILL.md
skills/pages/brand/home/SKILL.md
skills/pages/content/api/SKILL.md
skills/pages/content/article/SKILL.md
skills/pages/content/blog/SKILL.md
skills/pages/content/docs/SKILL.md
skills/pages/content/faq/SKILL.md

元信息

文件数
0
版本
70987ba
Hash
295666ea
收录时间
2026-07-06 00:04

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-10 17:58
浙ICP备14020137号-1 $访客地图$