Цю сторінку ще не перекладено українською, тому нижче англійська версія.

Widgets inside widgets html()

Widgets nest: a widget body is HTML, so tabs can hold an accordion that holds a table, a list group and a panel.

Приклад

Orders 12
Returns 1
  • Order 1001
  • Order 1002

Note

Panels, wells and alerts nest the same way.

Код

$table = html()->simple_table(['Orders' => 12, 'Returns' => 1]);
$inner = html()->accordion([
    'Summary' => $table,
    'Latest' => html()->list_group(['Order 1001', 'Order 1002']),
]);
return html()->tabs([
    'Shop' => $inner,
    'Notes' => html()->panel(['title' => 'Note', 'body' => 'Panels, wells and alerts nest the same way.']),
]);

Примітки

  • Ids are counted per widget kind and page, so nested widgets do not clash.

Див. також: html/tabs, html/accordion