NAME

Chandra::Breadcrumb - Breadcrumb navigation component

SYNOPSIS

use Chandra::Breadcrumb;

my $crumbs = Chandra::Breadcrumb->new(
    items => [
        { label => 'Home',  route => '/' },
        { label => 'Users', route => '/users' },
        { label => 'Alice' },
    ],
);

$app->css(Chandra::Breadcrumb->css);
$crumbs->mount($app, '#breadcrumb');

METHODS

new(items = \@items, separator => $text)>

Each item is a hash with a label and, for all but the last, a route. The separator defaults to a single right-pointing angle quotation mark.

BUILD

Sets the default separator after the component's own BUILD.

render

The trail, with links for the items that have a route.

on_navigate($route)

Navigates the app when it can.

css

The breadcrumb's stylesheet.

prototype, set_prototype

Object::Proto's prototype accessors.

SLOT ACCESSORS

items, separator - the slots as methods
bc_items, bc_separator, bc__cid, bc__app, bc__selector, bc__mounted, bc__children, bc__parent - the slot functions

SEE ALSO

Chandra::Nav, Chandra::Tabs, Chandra::Component