AccueilComponentsBreadcrumbs

Breadcrumbs

Fil d'Ariane construit à partir de la navigation Expo Router. Tous les éléments sauf le dernier (page en cours) sont cliquables.
ui
Figma
Ouvrir Figma
(s'ouvre dans un nouvel onglet)
Default
AccueilComponentsBreadcrumbstsx
export const Default = () => (
<Box p="1V">
<Breadcrumbs />
</Box>
);
WithCustomRootLabel
Tableau de bordComponentsBreadcrumbstsx
export const WithCustomRootLabel = () => (
<Box p="1V">
<Breadcrumbs rootLabel="Tableau de bord" />
</Box>
);
WithCustomLabels
AccueilcomponentsBreadcrumbstsx
export const WithCustomLabels = () => (
<Box p="1V">
<Breadcrumbs
getLabel={(segment, _index, _path) => {
const labels: Record<string, string> = {
admin: 'Administration',
missions: 'Missions',
show: 'Détail',
salarie: 'Espace salarié',
client: 'Espace client',
};
return labels[segment] ?? segment;
WithCustomHref
AccueilComponentsBreadcrumbstsx
export const WithCustomHref = () => (
<Box p="1V">
<Breadcrumbs
getHref={(segment, _index, path) => {
const hrefs: Record<string, string> = {
components: '/ui-kit/components',
};
return hrefs[segment] ?? path;
}}
/>
</Box>
);
AccueilComponentsBreadcrumbstsx
export const WithNoLink = () => (
<Box p="1V">
<Breadcrumbs
getHref={(segment, _index, path) => {
const noLink = ['components'];
return noLink.includes(segment) ? null : path;
}}
/>
</Box>
);
WithSegmentsToSkip
AccueilBreadcrumbstsx
export const WithSegmentsToSkip = () => (
<Box p="1V">
<Breadcrumbs
segmentsToSkip={['admin', 'ui-kit', 'components']}
getLabel={(segment, _index, _path) => {
const labels: Record<string, string> = {
admin: 'Administration',
missions: 'Missions',
show: 'Détail',
salarie: 'Espace salarié',
client: 'Espace client',
};
Alveole UI Kit — v2.0.0-alpha.30