Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ui-awesome/html-attribute

UI Awesome HTML Attribute Code Generator for PHP.
https://github.com/ui-awesome/html-attribute

List: html-attribute

html-attribute php ui-awesome

Last synced: about 2 months ago
JSON representation

UI Awesome HTML Attribute Code Generator for PHP.

Awesome Lists containing this project

README

        





UI Awesome HTML Attribute Code Generator for PHP.





PHPUnit


Codecov


Infection


Psalm


Style ci

This package provides a set of traits to use in your classes to generate HTML attributes.

## Installation

The preferred way to install this extension is through [composer](https://getcomposer.org/download/).

Either run

```shell
composer require --prefer-dist ui-awesome/html-attribute:^0.2
```

or add

```json
"ui-awesome/html-attribute": "^0.2"
```

to the require section of your `composer.json` file.

## Usage

List of traits avaibles to use in your classes:

### Aria

- [HasAriaControls](src/Aria/HasAriaControls.php)
- [HasAriaDescribedBy](src/Aria/HasAriaDescribedBy.php)
- [HasAriaDisabled](src/Aria/HasAriaDisabled.php)
- [HasAriaExpanded](src/Aria/HasAriaExpanded.php)
- [HasAriaLabel](src/Aria/HasAriaLabel.php)
- [HasAriaRole](src/Aria/HasAriaRole.php)

### Data

- [HasDataBsAutoClose](src/Data/HasDataBsAutoClose.php)
- [HasDataBsDismiss](src/Data/HasFataBsDismiss.php)
- [HasDataBsTarget](src/Data/HasDataBsTarget.php)
- [HasDataBsToggle](src/Data/HasDataBsToggle.php)
- [HasDataCollapseToggle](src/Data/HasDataCollapseToggle.php)
- [HasDataDissmissTarget](src/Data/HasDataDissmissTarget.php)
- [HasDataDrawerTarget](src/Data/HasDataDrawerTarget.php)
- [HasDataDropdownToggle](src/Data/HasDataDropdownToggle.php)
- [HasDataToggle](src/Data/HasDataToggle.php)
- [HasDataValue](src/Data/HasDataValue.php)

> Note: Use enum classes [DataAttributeValues](src/Data/DataAttributeValues.php) for specify the data attribute keys.

### Global

- [CanBeAutofocus](src/CanBeAutofocus.php)
- [CanBeHidden](src/CanBeHidden.php)
- [HasAlt](src/HasAlt.php)
- [HasClass](src/HasClass.php)
- [HasData](src/HasData.php)
- [HasHeight](src/HasHeight.php)
- [HasId](src/HasId.php)
- [HasLang](src/HasLang.php)
- [HasName](src/HasName.php)
- [HasReferrerPolicy](src/HasReferrerPolicy.php)
- [HasRel](src/HasRel.php)
- [HasSrc](src/HasSrc.php)
- [HasStyle](src/HasStyle.php)
- [HasTabIndex](src/HasTabIndex.php)
- [HasTitle](src/HasTitle.php)
- [HasType](src/HasType.php)
- [HasValue](src/HasValue.php)
- [HasWidth](src/HasWidth.php)

### Form control

- [CanBeDisabled](src/FormControl/CanBeDisabled.php)
- [CanBeMultiple](src/FormControl/CanBeMultiple.php)
- [CanBeReadOnly](src/FormControl/CanBeReadOnly.php)
- [CanBeRequired](src/FormControl/CanBeRequired.php)
- [HasAccept](src/FormControl/Input/HasAccept.php)
- [HasAutoComplete](src/FormControl/HasAutoComplete.php)
- [HasDirname](src/FormControl/HasDirname.php)
- [HasFieldAttributes](src/FormControl/HasFieldAttributes.php)
- [HasForm](src/FormControl/HasForm.php)
- [HasFormaction](src/FormControl/HasFormaction.php)
- [HasFormenctype](src/FormControl/HasFormenctype.php)
- [HasFormmethod](src/FormControl/HasFormmethod.php)
- [HasFormnovalidate](src/FormControl/HasFormnovalidate.php)
- [HasFormtarget](src/FormControl/HasFormtarget.php)
- [HasMax](src/FormControl/HasMax.php)
- [HasMaxLength](src/FormControl/HasMaxLength.php)
- [HasMin](src/FormControl/HasMin.php)
- [HasMinLength](src/FormControl/HasMinLength.php)
- [HasPlaceholder](src/FormControl/HasPlaceholder.php)
- [HasSize](src/FormControl/HasSize.php)

#### Input

- [CanBeChecked](src/FormControl/Input/CanBeChecked.php)
- [HasPattern](src/FormControl/Input/HasPattern.php)
- [HasStep](src/FormControl/Input/HasStep.php)

## Testing

[Check the documentation testing](docs/testing.md) to learn about testing.

## Support versions

[![PHP81](https://img.shields.io/badge/PHP-%3E%3D8.1-787CB5)](https://www.php.net/releases/8.1/en.php)

## License

The MIT License (MIT). Please see [License File](LICENSE) for more information.

## Our social networks

[![Twitter](https://img.shields.io/badge/twitter-follow-1DA1F2?logo=twitter&logoColor=1DA1F2&labelColor=555555?style=flat)](https://twitter.com/Terabytesoftw)