Breadcrumbs
Shows where the current page sits in the hierarchy and lets people switch between its siblings.
Separators
slash
is the default.
arrow
suits paths such as files inside a bundle.
<.breadcrumbs style="slash">
<.breadcrumb id="breadcrumbs-slash-account" label="tuist" href="#separators" />
<.breadcrumb id="breadcrumbs-slash-project" label="ios-app" href="#separators" />
<.breadcrumb id="breadcrumbs-slash-page" label="Builds" href="#separators" />
</.breadcrumbs>
<.breadcrumbs style="arrow">
<.breadcrumb id="breadcrumbs-arrow-bundle" label="Tuist.app" href="#separators" />
<.breadcrumb id="breadcrumbs-arrow-frameworks" label="Frameworks" href="#separators" />
<.breadcrumb id="breadcrumbs-arrow-framework" label="TuistKit.framework" href="#separators" />
</.breadcrumbs>
Avatars and logos
The dashboard header shows an avatar for each account and the build system's logo for each project.
<.breadcrumbs>
<.breadcrumb
id="breadcrumbs-rich-account"
label="tuist"
href="#avatars-and-logos"
show_avatar
avatar_color="blue"
>
<.breadcrumb_item
id="breadcrumbs-rich-account-tuist"
value="tuist"
label="tuist"
show_avatar
avatar_color="blue"
selected
/>
<.breadcrumb_item
id="breadcrumbs-rich-account-rover"
value="rover-labs"
label="rover-labs"
show_avatar
avatar_color="orange"
/>
</.breadcrumb>
<.breadcrumb
id="breadcrumbs-rich-project"
label="ios-app"
href="#avatars-and-logos"
image="/images/build-systems/xcode.png"
>
<.breadcrumb_item
id="breadcrumbs-rich-project-ios"
value="ios-app"
label="ios-app"
image="/images/build-systems/xcode.png"
selected
/>
<.breadcrumb_item
id="breadcrumbs-rich-project-android"
value="android-app"
label="android-app"
image="/images/build-systems/gradle.png"
/>
<.breadcrumb_item
id="breadcrumbs-rich-project-server"
value="server"
label="server"
image="/images/build-systems/mix.png"
/>
</.breadcrumb>
<.breadcrumb id="breadcrumbs-rich-page" label="Module cache" href="#avatars-and-logos" />
</.breadcrumbs>
Guidelines
- Order the trail from the broadest level to the current page, as the dashboard does: account, then project, then the page.
-
Pass
hrefto eachbreadcrumbso its label navigates. Nestingbreadcrumb_items adds a menu trigger next to the label for switching to a sibling. -
Mark the current entry in a menu with
selected. It shows a check mark. -
Each breadcrumb shows one of an
image, an avatar, or an icon. Useshow_avatarfor accounts andimagefor a project's build system logo. The image takes the place of the avatar and the icon. -
Put actions such as Create project in the
footerslot. It stays below the scrollable list of items. -
Give every
breadcrumba uniqueid, and give abreadcrumb_itemone when it shows an avatar, since the avatar's id is derived from it.
API reference
<.breadcrumbs>
Also accepts global attributes.
<.breadcrumb>
Also accepts global attributes.