ui-awesome / html-attribute
UI Awesome HTML Attribute Code Generator for PHP.
Installs: 3 601
Dependents: 5
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
- ui-awesome/html-helper: ^0.2
- ui-awesome/html-interop: ^0.1
- voku/anti-xss: ^4.1
Requires (Dev)
- maglnet/composer-require-checker: ^4.7
- phpunit/phpunit: ^10.5
- roave/infection-static-analysis-plugin: ^1.34
- symplify/easy-coding-standard: ^12.1
- vimeo/psalm: ^5.20
README
UI Awesome HTML Attribute Code Generator for PHP.
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.
Either run
composer require --prefer-dist ui-awesome/html-attribute:^0.2
or add
"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
Data
-
Note: Use enum classes DataAttributeValues for specify the data attribute keys.
Global
- CanBeAutofocus
- CanBeHidden
- HasAlt
- HasClass
- HasData
- HasHeight
- HasId
- HasLang
- HasName
- HasReferrerPolicy
- HasRel
- HasSrc
- HasStyle
- HasTabIndex
- HasTitle
- HasType
- HasValue
- HasWidth
Form control
- CanBeDisabled
- CanBeMultiple
- CanBeReadOnly
- CanBeRequired
- HasAccept
- HasAutoComplete
- HasDirname
- HasFieldAttributes
- HasForm
- HasFormaction
- HasFormenctype
- HasFormmethod
- HasFormnovalidate
- HasFormtarget
- HasMax
- HasMaxLength
- HasMin
- HasMinLength
- HasPlaceholder
- HasSize
Input
Testing
Check the documentation testing to learn about testing.
Support versions
License
The MIT License (MIT). Please see License File for more information.