Basic
Demo[area:// sensei/docs/ui/pillbox/example-basic ]
Code[area:// sensei/docs/ui/pillbox/example-basic ]
<?php
use Nether\Atlantis;
use Nether\Common;
$Route->Data->Nav(
Common\Filters\Misc::OneOfTheseFirst(...),
[ 'one', 'two', 'three', 'four', 'five' ]
);
// navigation items need at least have a Title, URL, and UUID for the element
// to be able to do any useful work.
echo Atlantis\UI\Pillbox::FromSurfaceWith($Surface, [
'Section' => $Route->Data->Nav,
'Items' => [
Atlantis\Struct\Item::New(Title: 'Item One', URL: '?nav=one', UUID: 'one'),
Atlantis\Struct\Item::New(Title: 'Item Two', URL: '?nav=two', UUID: 'two'),
Atlantis\Struct\Item::New(Title: 'Item Three', URL: '?nav=three', UUID: 'three'),
Atlantis\Struct\Item::New(Title: 'Item Four', URL: '?nav=four', UUID: 'four'),
Atlantis\Struct\Item::New(Title: 'Item Five', URL: '?nav=five', UUID: 'five')
]
]);
Dropdown
Demo[area:// sensei/docs/ui/pillbox/example-dropdown ]
Item One
Item Two
Item Three
Item Four
Item Five
Code[area:// sensei/docs/ui/pillbox/example-dropdown ]
<?php
use Nether\Atlantis;
use Nether\Common;
$Route->Data->Nav(
Common\Filters\Misc::OneOfTheseFirst(...),
[ 'one', 'two', 'three', 'four', 'five' ]
);
// navigation items need at least have a Title, URL, and UUID for the element
// to be able to do any useful work.
$Dropdown = Atlantis\UI\Pillbox::FromSurfaceWith($Surface, [
'Area' => 'elements/pillbox/dropdown',
'Section' => $Route->Data->Nav,
'Items' => [
Atlantis\Struct\Item::New(Title: 'Item One', URL: '?nav=one', UUID: 'one'),
Atlantis\Struct\Item::New(Title: 'Item Two', URL: '?nav=two', UUID: 'two'),
Atlantis\Struct\Item::New(Title: 'Item Three', URL: '?nav=three', UUID: 'three'),
Atlantis\Struct\Item::New(Title: 'Item Four', URL: '?nav=four', UUID: 'four'),
Atlantis\Struct\Item::New(Title: 'Item Five', URL: '?nav=five', UUID: 'five')
]
]);
?>
<div class="row justify-content-center">
<div class="col-auto">
<?php echo $Dropdown ?>
</div>
</div>
Moredown Auto Fit
Demo[area:// sensei/docs/ui/pillbox/example-moredown-auto ]
Code[area:// sensei/docs/ui/pillbox/example-moredown-auto ]
<?php
use Nether\Atlantis;
use Nether\Common;
$Route->Data->Nav(
Common\Filters\Misc::OneOfTheseFirst(...),
[ 'one', 'two', 'three', 'four', 'five' ]
);
// navigation items need at least have a Title, URL, and UUID for the element
// to be able to do any useful work.
$Dropdown = Atlantis\UI\Pillbox::FromSurfaceWith($Surface, [
'Area' => 'elements/pillbox/moredown',
'Section' => $Route->Data->Nav,
'Items' => [
Atlantis\Struct\Item::New(Title: 'Item One', URL: '?nav=one', UUID: 'one'),
Atlantis\Struct\Item::New(Title: 'Item Two', URL: '?nav=two', UUID: 'two'),
Atlantis\Struct\Item::New(Title: 'Item Three', URL: '?nav=three', UUID: 'three'),
Atlantis\Struct\Item::New(Title: 'Item Four', URL: '?nav=four', UUID: 'four'),
Atlantis\Struct\Item::New(Title: 'Item Five', URL: '?nav=five', UUID: 'five')
]
]);
?>
<div class="row justify-content-center">
<div class="col">
<?php echo $Dropdown ?>
</div>
</div>
Moredown Set Number
Demo[area:// sensei/docs/ui/pillbox/example-moredown-set ]
Code[area:// sensei/docs/ui/pillbox/example-moredown-set ]
<?php
use Nether\Atlantis;
use Nether\Common;
$Route->Data->Nav(
Common\Filters\Misc::OneOfTheseFirst(...),
[ 'one', 'two', 'three', 'four', 'five' ]
);
// navigation items need at least have a Title, URL, and UUID for the element
// to be able to do any useful work.
$Dropdown = Atlantis\UI\Pillbox::FromSurfaceWith($Surface, [
'Area' => 'elements/pillbox/moredown',
'Max' => 2,
'Section' => $Route->Data->Nav,
'Items' => [
Atlantis\Struct\Item::New(Title: 'Item One', URL: '?nav=one', UUID: 'one'),
Atlantis\Struct\Item::New(Title: 'Item Two', URL: '?nav=two', UUID: 'two'),
Atlantis\Struct\Item::New(Title: 'Item Three', URL: '?nav=three', UUID: 'three'),
Atlantis\Struct\Item::New(Title: 'Item Four', URL: '?nav=four', UUID: 'four'),
Atlantis\Struct\Item::New(Title: 'Item Five', URL: '?nav=five', UUID: 'five')
]
]);
?>
<div class="row justify-content-center">
<div class="col-auto">
<?php echo $Dropdown ?>
</div>
</div>