Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/thematters/matters-web/ui-component-conventiongit clone --depth 1 https://github.com/thematters/matters-webWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/thematters/matters-web/ui-component-convention)<a href="https://agentmods.dev/rules/thematters/matters-web/ui-component-convention"><img src="https://agentmods.dev/badge/rules/thematters/matters-web/ui-component-convention.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00008 | $0.00386 |
| Opus 5 | $0.00004 | $0.00193 |
| Sonnet 5 | $0.00002 | $0.00077 |
| Haiku 4.5 | $0.00001 | $0.00039 |
Grade A, and why
ui-component-convention scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
UI Components Convention
Matters Web uses a standardized approach for UI components with consistent patterns for props, styling, and variations.
Here we use src/components/Button as an example:
Type Definitions
- Props are strongly typed with explicit, restricted values
- Component variations use union types (e.g.,
ButtonWidth,ButtonColor) - Core props are exported for reuse while internal types remain private
- Uses TypeScript's
Extractto define subsets of broader types
Styling Approach
- Uses CSS Modules with classNames utility for conditional styling
- Follows a pattern of
{property}{Value}for class names (e.g.,textGreen,borderRed) - Handles dynamic styles through prop-based conditions
- Provides active/hover states via separate props (e.g.,
textActiveColor) - Uses CSS variables from the global theme
Component Structure
- Accepts standardized size and spacing parameters
- Supports multiple rendering options (button, link, anchor, span)
- Implements forwardRef for ref forwarding
- Provides comprehensive documentation with usage examples
- Uses a consistent structure for container and content
Best Practices
- Centralize shared prop types in the component file
- Use descriptive prop names that indicate purpose
- Document component behavior using JSDoc comments
- Include usage examples for complex components
- Handle accessibility considerations (focus states, keyboard navigation)
- Ensure all interactive elements have appropriate event handlers
When Creating UI Components
- Start by defining clear prop interfaces with TypeScript
- Create a dedicated styles.module.css with the same structure as the component
- Follow naming conventions established in existing components
- Use classNames for conditional class application
- Include comprehensive JSDoc documentation
- Ensure consistent behavior across rendering contexts
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 52 lines · 8 tokens per session scan A 4468a66612f1
ui-component-convention is a cursor rule published in the GitHub repository thematters/matters-web (86 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 8 tokens to every session and 386 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
frontend-web
Cursor rule "frontend-web" from groupultra/telegram-search, covering frontend (apps/web), routing, layouts & navigation, state & data fetching, ui, styling & ux and error handling & notifications.
codex-premium-website-skills
Apply Codex Skills standards to frontend, website, motion, accessibility, QA, agent reasoning, and handoff work.
ui-components
USE WHEN: Building UI components, structuring layouts, and applying styles using Tailwind CSS.
frontend-architecture
Vite + React SPA architecture - directory layout, providers, bundle splitting. Tailwind styling in tailwind.mdc.
css-render-blocking-diagnosis
Cursor rule "css-render-blocking-diagnosis" from adobecom/da-express-milo, covering css render-blocking diagnosis & resolution, critical learning from 98 pagespeed achievement, primary diagnostic protocol, step 1: css blocking symptom recognition and step 2: css loading sequence audit.
z-index
Z-index layering conventions for consistent stacking.