high-five/craft-hyperdrive

Light-speed Craft CMS development

dev-main 2025-09-18 12:11 UTC

This package is auto-updated.

Last update: 2025-09-18 12:11:46 UTC


README

Light-speed Craft CMS development

craft-hyperdrive is a component library for Craft CMS that applies atomic design principles and leverages Tailwind CSS for styling. It’s built to help developers ship scalable, consistent, and maintainable front-end interfaces at warp speed.

✨ Features

  • 🧩 Atomic Design Structure β€” Atoms, molecules, organisms and templates clean, reusable UI.
  • 🎨 Tailwind CSS Ready β€” Utility-first styling out of the box, fully customizable.
  • ⚑ Light-speed Craft CMS Development β€” Drop in pre-built components and accelerate your workflow.
  • πŸ”Œ Twig Extension Included β€” Render atoms, molecules, organisms, or particles with simple helpers.
  • πŸ›  Overridable Components β€” Project-level overrides let you customize or extend components without forking.
  • πŸ§ͺ Safe Fallbacks β€” Missing components log a warning instead of breaking your templates.

πŸ”§ Requirements

  • Craft CMS ^5.0
  • Tailwind CSS ^3.0
  • PHP ^8.4

πŸ“¦ Installation

composer require high-five/craft-hyperdrive
php craft plugin/install hyperdrive

Add component paths to your Tailwind config:

// tailwind.config.js
module.exports = {
  content: [
    './templates/**/*.twig',
    './vendor/high-five/craft-hyperdrive/src/templates/**/*.twig',
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

πŸš€ Getting Started

Use Components with Twig Helpers

Atoms

{{ atom('button', { label: 'Submit', url: '/submit', style: 'primary' }) }}

Molecules

{{ molecule('card', {
  title: 'Card Title',
  body: 'Card body text goes here.',
  image: entry.image.one()
}) }}

Organisms

{{ organism('hero', {
  heading: entry.title,
  subheading: entry.teaser,
  cta: [{ label: 'Learn More', url: entry.url }]
}) }}

πŸ“‚ Overriding & Custom Components

To override or define new components, create a hyperdrive/ folder in your project’s templates:

templates/
└── hyperdrive/
    β”œβ”€β”€ atoms/
    β”‚   └── button.twig            # overrides vendor button
    β”œβ”€β”€ molecules/
    β”‚   └── card.twig              # overrides vendor card
    └── organisms/
        └── newsletter-signup.twig # custom project-only component