PHPackages                             rayful/html - 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. [Templating &amp; Views](/categories/templating)
4. /
5. rayful/html

ActiveLibrary[Templating &amp; Views](/categories/templating)

rayful/html
===========

A HTML php echo class, including output option, radio, checkbox, select, ul, span, label, a, and so on. Can be extended to any HTML elements.

0.3(10y ago)0478MITPHP

Since Apr 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/rayful/HTML)[ Packagist](https://packagist.org/packages/rayful/html)[ RSS](/packages/rayful-html/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

HTML
====

[](#html)

一个后台使用的直接把HTML的元素输出封装好的类。

### 安装

[](#安装)

composer require rayful/html

### 命名规则

[](#命名规则)

为了让代码在HTML文件里看得更舒服，因此关于输出HTML的类比如：select、option、a等全部用小写。

### 文件分布及用类区别

[](#文件分布及用类区别)

- Element目录：只生成某些元素，不设定任何参数。
- Generator目录：可通过构造函数里面传参，直接构造出特定的元素。（为方便，Generator里面构造出来的元素，name和id都会同时设定并且一样）
- View目录：和样式有关，将在Generator的基础上再加上样式。

### 基本用法

[](#基本用法)

模板文件里面：

```

```

将输出：

```

  全部
  取消
  未完成
  成功

```

同时option可以自动选中。

### 进阶用法

[](#进阶用法)

请见test/example.php的用法。

#### 效果请见：

[](#效果请见)

- test/bootstrap3.php
- test/bootstrap4.php

#### Editor.php的使用：

[](#editorphp的使用)

- test/bootstrap3-editor.php
- test/bootstrap4-editor.php

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Every ~135 days

Total

5

Last Release

3172d ago

Major Versions

0.3 → 2.0-beta2017-09-27

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4504653?v=4)[Kingmax Yang](/maintainers/kingmaxyang)[@kingmaxyang](https://github.com/kingmaxyang)

---

Top Contributors

[![kingmaxyang](https://avatars.githubusercontent.com/u/4504653?v=4)](https://github.com/kingmaxyang "kingmaxyang (10 commits)")

### Embed Badge

![Health badge](/badges/rayful-html/health.svg)

```
[![Health](https://phpackages.com/badges/rayful-html/health.svg)](https://phpackages.com/packages/rayful-html)
```

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3861.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

281.8k](/packages/webkinder-sproutset)

PHPackages © 2026

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