Skip to content

Component Library & Seed Components #638

@aryanjasala

Description

@aryanjasala

Context

There is no shared component library across rtCamp projects. UI patterns like buttons, cards, and hero sections are rebuilt from scratch on every project. A centrally-maintained library with a scaffold-first delivery model solves this without the hard-dependency problem that blocked previous attempts.

Expected Outcome

A new rtcamp/component-library repository published to GitHub Package Registry with ≥5 seed components. Each component is available both as a scaffoldable template (primary) and as a direct dependency (secondary).

Seed components: Button/CTA, Card, Hero, Navigation, Post Loop

Each component includes:

components/
└── Button/
    ├── Button.php         # PHP partial (render-only)
    ├── Button.scss        # Styles
    ├── block.json         # Gutenberg block definition (where applicable)
    ├── edit.js           # Block editor view
    ├── view.js            # Frontend interactivity
    └── README.md          # Usage and props

Scaffold command (see TASK-009):

npx rtcamp scaffold component Button
# Copies Button/ into the project's src/Components/

Acceptance Criteria

  • Repository created, v0.0.1 published to GitHub Package Registry
  • ≥5 seed components implemented
  • All components meet WCAG AA accessibility standards
  • Each component works as a PHP partial via rtcamp_component()
  • Each applicable component works as a Gutenberg block
  • Scaffold templates exist for all components (used by TASK-009)
  • Components support both Tailwind and SCSS styling approaches

Notes

  • Scaffold-first is the primary delivery model. Direct imports are secondary.
  • Components must be render-only — no data fetching, no business logic.
  • Consume @rtcamp/standards (TASK-004) for linting configs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions