PHPackages                             wubinworks/module-require-css - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wubinworks/module-require-css

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

wubinworks/module-require-css
=============================

An extremely simple module that enables Magento 2's ability to use Require Css.

1.0.0(2y ago)061OSL-3.0JavaScript

Since Oct 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/wubinworks/magento2-require-css)[ Packagist](https://packagist.org/packages/wubinworks/module-require-css)[ RSS](/packages/wubinworks-module-require-css/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Introduction
============

[](#introduction)

**An extremely simple module that enables Magento 2's ability to use Require Css.**
*(This module is designed as a dependency for making other modules.)*

- Very useful when you need to load css in `.phtml`.
- Dynamically load css.
- Use inside ``(eg: load different external css for different stores).

Usage
=====

[](#usage)

```

// Load a single css in
// [module root]/view/[area]/web/css/example-01.css
// or
// [theme root]/web/css/example-01.css
require(['require-css!css/example-01']);

// Load multiple css.
require([
    'require-css!css/example-02',
    'require-css!css/example-03'
], function () {
    // Code to run when all css loaded successfully.
});

// Load external css. You don't need the .css extension.
require(['require-css!https://some-cdn.tld/styles']);

```

How it works
============

[](#how-it-works)

The core part, which is a RequireJS Plugin, is taken from [here](https://github.com/guybedford/require-css). When the dependency `require-css!css/styles` is required, it will inject a `link` element that contains stylesheet into ``.

#### Best used with

[](#best-used-with)

[wubinworks/HeadContent](https://github.com/wubinworks/HeadContent)

Requirements
============

[](#requirements)

**Magento 2**

Installation
============

[](#installation)

**`composer require wubinworks/module-require-css`**
Don't forget to run `php bin/magento setup:upgrade`

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

953d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7de965a6287fb784969afeb4b173521d3cb59c6b873b7248263abb9fc098eddd?d=identicon)[wubinworks](/maintainers/wubinworks)

---

Top Contributors

[![wubinworks](https://avatars.githubusercontent.com/u/127310257?v=4)](https://github.com/wubinworks "wubinworks (1 commits)")

---

Tags

cssmagento2magento2-extension-freerequirecssrequirejs

### Embed Badge

![Health badge](/badges/wubinworks-module-require-css/health.svg)

```
[![Health](https://phpackages.com/badges/wubinworks-module-require-css/health.svg)](https://phpackages.com/packages/wubinworks-module-require-css)
```

###  Alternatives

[baldwin/magento2-module-url-data-integrity-checker

Magento 2 module which can find potential url related problems in your catalog data

281773.3k](/packages/baldwin-magento2-module-url-data-integrity-checker)[ethanyehuda/magento2-cronjobmanager

A module for managing scheduled cron jobs from magento's admin panel

3632.5M1](/packages/ethanyehuda-magento2-cronjobmanager)[snowdog/module-menu

Provides powerful menu editor to replace category based menus in Magento 2

3271.7M5](/packages/snowdog-module-menu)[magepal/magento2-googletagmanager

Google Tag Manager (GTM) for Magento 2 with Advance Data Layer

2671.5M4](/packages/magepal-magento2-googletagmanager)[yireo/magento2-webp2

Magento 2 module to add WebP support to the Magento frontend

2091.2M7](/packages/yireo-magento2-webp2)[yireo/magento2-googletagmanager2

Add Google Tag Manager to Magento

167930.4k5](/packages/yireo-magento2-googletagmanager2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
