Bar component
Basic usage
Display a large bar that take the full width of his container.
use Hiker\Components\Bar\Bar;
Bar::make();
Methods
Items
You may use the items
method to display an array of components in the main area.
Bar::make()
->items([
DisplayStatusfield::make('success','Available'),
DisplayTextfield::make('Non mollit exercitation elit ad aute.')
]);
Item
The item
method display a component one at the time in the main area.
Bar::make()
->item(DisplayStatusfield::make('success','Available'))
->item(DisplayTextfield::make('Non mollit exercitation elit ad aute.'));
Did you know ?
If you want to use the item
and items
methods at the same time, make sure that item
is called after
items
. If it is not the case, the items
method will overwrite items previously instantiated with item
.
Right
The right
method allows you to display components in purple on the right side.
Bar::make()
->right(DisplayTextfield::make('Anim sit exercitation esse'));