projectrules.ai

Section Rules

HTMXWeb DevelopmentReusable ComponentsFrontendBest Practices

Description

Using HTMX you often get multiple paths that all render the same section of a web page. Make these sections reusable instead of repeating yourself.

Globs

**/*
---
description: Using HTMX you often get multiple paths that all render the same section of a web page. Make these sections reusable instead of repeating yourself.
globs: **/*
---

# Section Rules

- Sections should always have a unique ID for HTMX targeting
- IDs should be descriptive and follow kebab-case naming convention
- Sections that may be re-rendered via HTMX should use consistent IDs
- Section IDs should match their HTMX target selectors.
- The use of sections in this way is the enforce the pattern of rerendring a section after a change have been submitted to the server.
Section Rules