patterns

This skill provides reusable patterns for common page types and content blocks. Patterns combine semantic HTML with custom elements to create consistent, accessible structures.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "patterns" with this command: npx skills add profpowell/vanilla-breeze/profpowell-vanilla-breeze-patterns

HTML Patterns Skill

This skill provides reusable patterns for common page types and content blocks. Patterns combine semantic HTML with custom elements to create consistent, accessible structures.

Philosophy

Pages are composed of blocks - reusable content patterns that appear across many pages. By defining custom elements for these blocks, we:

  • Communicate intent - <faq-question> is clearer than <dt class="faq-q">

  • Enable styling - Custom elements can be styled with CSS

  • Support tooling - Validators can enforce correct usage

  • Document structure - The markup is self-documenting

Available Patterns

Pattern Elements Use Case

FAQ faq-list , faq-question , faq-answer

Q&A pages, help sections

Product Card product-card

Product listings, catalogs

FAQ Pattern

Elements

faq-list ├── faq-question ├── faq-answer ├── faq-question ├── faq-answer └── ...

Element Definitions

Element Content Attributes

faq-list

faq-question , faq-answer

category (optional)

faq-question

Phrasing content (text, links) id (for anchor links)

faq-answer

Flow content (paragraphs, lists)

Usage

<section id="products" aria-labelledby="products-heading"> <h2 id="products-heading">Products</h2> <faq-list category="products"> <faq-question id="faq-returns">What is your return policy?</faq-question> <faq-answer>We offer a 30-day hassle-free return policy.</faq-answer>

&#x3C;faq-question id="faq-shipping">How long does shipping take?&#x3C;/faq-question>
&#x3C;faq-answer>Standard shipping takes 5-7 business days.&#x3C;/faq-answer>

</faq-list> </section>

Complete FAQ Page Structure

<main id="main"> <article> <h1>Frequently Asked Questions</h1>

&#x3C;!-- Table of contents -->
&#x3C;nav aria-label="FAQ sections">
  &#x3C;ul>
    &#x3C;li>&#x3C;a href="#products">Products&#x3C;/a>&#x3C;/li>
    &#x3C;li>&#x3C;a href="#shipping">Shipping&#x3C;/a>&#x3C;/li>
  &#x3C;/ul>
&#x3C;/nav>

&#x3C;!-- FAQ sections -->
&#x3C;section id="products" aria-labelledby="products-heading">
  &#x3C;h2 id="products-heading">Products&#x3C;/h2>
  &#x3C;faq-list category="products">
    &#x3C;faq-question id="faq-q1">Question text?&#x3C;/faq-question>
    &#x3C;faq-answer>Answer text.&#x3C;/faq-answer>
  &#x3C;/faq-list>
&#x3C;/section>

&#x3C;!-- More sections... -->

&#x3C;!-- Call to action -->
&#x3C;aside>
  &#x3C;p>&#x3C;strong>Still have questions?&#x3C;/strong>&#x3C;/p>
  &#x3C;p>&#x3C;a href="/contact">Contact us&#x3C;/a>&#x3C;/p>
&#x3C;/aside>

</article> </main>

Accessibility Notes

  • Each section has aria-labelledby pointing to its heading

  • Questions have id attributes for direct linking

  • Table of contents uses <nav> with descriptive aria-label

  • Links within answers use proper mailto: and tel: protocols

Product Card Pattern

Element Definition

Element Content Attributes

product-card

Flow content sku , price (optional)

Usage

<product-card sku="WDG-PRO-001" price="79.99"> <img src="widget-pro.jpg" alt="Widget Pro"/> <h3>Widget Pro</h3> <p>Our best-selling widget with enhanced durability.</p> <a href="/products/widget-pro">View details</a> </product-card>

Product Listing Structure

<section aria-labelledby="products-heading"> <h2 id="products-heading">Our Products</h2> <ul> <li> <product-card sku="WDG-001"> <img src="widget.jpg" alt="Basic Widget"/> <h3>Basic Widget</h3> <p>Entry-level widget for beginners.</p> </product-card> </li> <!-- More products... --> </ul> </section>

Creating New Patterns

When you identify a repeating content structure:

  • Define the elements in elements.json

  • Document the pattern in this skill

  • Create an example in the examples directory

  • Add to project dictionary if needed

Element Naming Conventions

  • Use lowercase with hyphens: pattern-element

  • Be descriptive: faq-question not fq

  • Group related elements: faq-list , faq-question , faq-answer

Page Type Patterns

Beyond component blocks, entire page types follow patterns:

Page Type Key Sections

Homepage Hero, featured products, news, CTA

About History, mission, values, leadership, milestones

Product List Category nav, product grid, filters

Product Detail Hero, specs, reviews, related

Contact Info, form, map, hours

FAQ TOC nav, categorized Q&A sections

Press Release Headline, dateline, body, boilerplate, contacts

Legal Numbered sections, definitions, effective date

See individual examples in the .claude/patterns/pages/ directory.

Related Skills

  • xhtml-author - Write valid XHTML-strict HTML5 markup

  • css-author - Modern CSS organization with native @import, @layer casca...

  • progressive-enhancement - HTML-first development with CSS-only interactivity patterns

  • forms - HTML-first form patterns with CSS-only validation

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

validation

No summary provided by upstream source.

Repository SourceNeeds Review
General

fake-content

No summary provided by upstream source.

Repository SourceNeeds Review
General

i18n

No summary provided by upstream source.

Repository SourceNeeds Review