echo \yii\helpers\Html::textInput('username', 'default value', ['class' => 'form-control']);
echo \yii\helpers\Html::textInput('comment', '', ['class' => 'form-control', 'rows' => 3]);This code example creates a text input element that will allow the user to enter comments. The first parameter is the field name, the second is the default value (an empty string in this case), and the third is an array of input options such as CSS class and rows. This code uses the textInput method to create the text input field. Package library: The Html helper class is part of the Yii framework and comes bundled with it. It is not a separate package/library.