Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Html Laravel Package

yiisoft/html

Yii HTML is a PHP library for safe, dynamic server-side HTML generation. It provides classes for common HTML tags, a CustomTag builder, widgets like ButtonGroup/CheckboxList/RadioList, automatic content encoding with NoEncode, and an Html helper API.

View on GitHub
Deep Wiki
Context7
4.1.0
  • New #274: Add test helper functions for controlling HTML ID generation (@vjik)

Full changelog

4.0.0
  • New #270: Allow passing int, float and null as tag content (@vjik)
  • Chg #221: Throw LogicException in Tag::id() when id is empty string (@razvbir)
  • Chg #234: Remove tag attributes sorting (@FrankiFixx)
  • Chg #267: Make all CheckboxItem and RadioItem properties required (@vjik)
  • Chg #269: Rename $options parameter to $attributes in Html::addCssClass(), Html::removeCssClass(), Html::addCssStyle() and Html::removeCssStyle() methods (@vjik)

Full changelog

3.13.0
  • New #260: Add $attributes parameter to Html::li() method (@gauravkumar2525)
  • Chg #243: Deprecate static constructors such as TagName::tag() in favor of new TagName() (@razvbir)
  • Enh #261: Enhance RadioList::addRadioWrapClass() method for cleaner class addition (@vjik)
  • Enh #263: Explicitly import classes and constants in "use" section (@mspirkov)

Full changelog

3.12.0
  • New #249: Add Tag::addStyle() and Tag::removeStyle() methods (@vjik)
  • New #252: Add Color class, Html::color() and Input::color() methods (@razvbir)
  • Enh #258: Add PHP 8.5 support (@vjik)
  • Enh #259: Minor refactor RadioList::renderUncheckInput() and CheckboxList::renderUncheckInput() methods (@vjik)

Full changelog

3.11.0
  • New #237: Add classes for Code and Pre tags, Html::code() and Html::pre() methods (@FrankiFixx)
  • Enh #246: Add psalm type OptionsData in Select class (@vjik)
  • Bug #245: Explicitly marking parameters as nullable (@Tigrov)
3.10.0
  • Chg #240, #242: Change PHP constraint in composer.json to 8.1 - 8.4 (@vjik)
  • Enh #223: Make $content parameter optional in Button factories (@FrankiFixx)
  • Enh #244: Allow to pass null to Select::value() method (@vjik)
  • Bug #232: Render loading attribute before src (@samdark)
  • Bug #242: Fix the nullable parameter declarations for compatibility with PHP 8.4 (@vjik)
3.9.0
  • Enh #230: Add backed enumeration value support to Html::addCssClass(), Tag::addClass() and Tag::class() methods (@terabytesoftw)
3.8.0
  • New #224: Add optional wrap parameter to BooleanInputTag::label() method that controls whether to wrap input tag with label tag or place them aside (@vjik)
  • New #225: Add CheckboxList::checkboxLabelWrap() and RadioList::radioLabelWrap() methods (@vjik)
  • New #227, #228: Add ability to wrap items in checkbox and radio lists by using methods CheckboxList::checkboxWrapTag(), CheckboxList::checkboxWrapAttributes(), CheckboxList::checkboxWrapClass(),
    CheckboxList::addCheckboxWrapClass(), RadioList::radioWrapTag(), RadioList::radioWrapAttributes(), RadioList::radioWrapClass() and RadioList::addRadioWrapClass() (@vjik)
  • Enh #220: Add non-empty-string psalm type of Html::generateId() method result (@vjik)
  • Enh #220: Add non-empty-string|null psalm type of Tag::id() method parameter (@vjik)
  • Enh #222: Bump minimal PHP version to 8.1 and refactor (@vjik)
3.7.0
  • New #218: Add methods Script::nonce() and Script::getNonce() for CSP (@Gerych1984, @vjik)
  • Enh #219: Add backed enumeration value support to Select tag (@vjik)
3.6.0
  • Enh #212: Throw InvalidArgumentException in Html::renderAttribute() when attribute name is empty or contains forbidden symbols (@es-sayers, @vjik)
  • Enh #214: Add Stringable and array values support to textarea tag (@vjik)
  • Enh #217: Add backed enumeration value support to CheckboxList and RadioList widgets (@vjik)
  • Bug #208: Fix output of null value attributes in Html::renderTagAttributes() (@es-sayers)
3.5.0
  • New #192: Add class for tag hr and method Html::hr() (@abdulmannans)
  • Enh #200: Add support for multiple elements in aria-describedby attribute (@arogachev)
3.4.0
  • New #182: Add ability set attributes for label of items in widgets CheckboxList and RadioList (@vjik)
3.3.0
  • New #173: Add class for tag html and method Html::html() (@dood-)
  • Chg #179: Replace constant PHP_EOL to "\n" (@vjik)
  • Enh #180: Don't add "class" attribute in Html::addCssClass() if passed array contains null classes only (@vjik)
3.2.0
  • New #174: Add $attributes parameter to Html::ul() and Html::ol() (@AmolKumarGupta)
  • Enh #176: Allow pass null as class to Html::addCssClass(), nulled classes will be ignored (@vjik)
  • Bug #171: Fix loss of keys for named class in Html::addCssClass() when class in passed options is a string (@vjik)
3.1.0
  • New #137: Add $attributes parameter to Html::img() (@alien-art)
  • New #150: Add class for tag small and method Html::small() (@dood-)
  • Enh #153: Add support of yiisoft/arrays version ^3.0 (@vjik)
3.0.0
  • New #139: Add loading() method to Img tag (@jacobbudin)
  • Chg #135: Raise yiisoft/arrays version to ^2.0 (@vjik)
  • Chg #136: Remove Tag::class() and rename Tag::replaceClass() to Tag::class() (@vjik)
  • Chg #140: Remove Html::fileInput() and Input::file(), rename Input::fileControl() to Input::file() (@vjik)
  • Chg #141: Tag class: remove attributes() method and rename replaceAttributes() to attributes() (@vjik)
  • Chg #141: Range class: remove outputAttributes() method and rename replaceOutputAttributes() to outputAttributes() (@vjik)
  • Chg #141: File class: remove uncheckInputAttributes() method and rename replaceUncheckInputAttributes() to uncheckInputAttributes() (@vjik)
  • Chg #141: ButtonGroup class: remove buttonAttributes() method and rename replaceButtonAttributes() to buttonAttributes() (@vjik)
  • Chg #141: CheckboxList: remove individualInputAttributes() and checkboxAttributes() methods, rename replaceIndividualInputAttributes() to individualInputAttributes() and replaceCheckboxAttributes() to checkboxAttributes() (@vjik)
  • Chg #141: RadioList class: remove individualInputAttributes() and radioAttributes() methods, rename replaceIndividualInputAttributes() to individualInputAttributes() and replaceRadioAttributes() to radioAttributes() (@vjik)
  • Enh #133: Raise minimum PHP version to 8.0 and refactor code (@xepozz, @vjik)
  • Enh #142: Make NoEncodeStringableInterface extend from Stringable interface (@vjik)
  • Enh #143: Minor type hinting improvements (@vjik)
  • Bug #143: Fix a typo in the message of exception that thrown on invalid buttons' data in ButtonGroup widget (@vjik)
2.5.0
  • New #122: Add Tag::addAttributes(), ButtonGroup::addButtonAttributes(), RadioList::addRadioAttributes(), RadioList::addIndividualInputAttributes(), CheckboxList::addCheckboxAttributes(), CheckboxList::addIndividualInputAttributes(), File::addUncheckInputAttributes(), Range::addOutputAttributes() and deprecate Tag::attributes(), ButtonGroup::buttonAttributes(), RadioList::radioAttributes(), RadioList::individualInputAttributes(), CheckboxList::checkboxAttributes(), CheckboxList::individualInputAttributes(), File::uncheckInputAttributes(), Range::outputAttributes() (@vjik)
  • New #123: Add Tag::addClass() and deprecate Tag::class() (@vjik)
  • New #129: Add methods enctypeApplicationXWwwFormUrlencoded(), enctypeMultipartFormData() and enctypeTextPlain() to Form tag class (@vjik)
2.4.0
  • New #97: Add classes for tags Body, Article, Section, Nav, Aside, Hgroup, Header, Footer, Address and methods Html::body(), Html::article(), Html::section(), Html::nav(), Html::aside(), Html::hgroup(), Html::header(), Html::footer(), Html::address() (soodssr)
  • New #103: Add class for tag Form and method Html::form() (vjik)
  • New #105: Add specialized class File for an input tag with type file and methods Html::file() and Input::fileControl() (vjik)
  • New #109: Add class for tag Datalist and method Html::datalist() (vjik)
  • New #109, #117: Add specialized class for input tag with type Range and methods Html::range(), Input::range() (vjik)
  • New #111: Add widget ButtonGroup (vjik)
  • New #111: Add method Tag::unionAttributes() that available for all tags (vjik)
  • New #113: Add class for tag Legend, class for tag Fieldset, methods Html::legend() and Html::fieldset() (vjik)
  • Enh #102: Remove psalm type HtmlAttributes, too obsessive for package users (vjik)
  • Enh #104: Add parameter $attributes to methods Html::input(), Html::buttonInput(), Html::submitInput() and Html::resetInput() (vjik)
  • Enh #106: Add option groups support to method Select::optionsData() (vjik)
  • Enh #108: Add individual attributes of options and option groups support to method Select::optionsData() (vjik)
  • Enh #115: Add methods CheckboxList::name() and RadioList::name() (vjik)
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle