Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
* (c) Copyright 2026 Palantir Technologies Inc. All rights reserved.
*/

import type { Meta, StoryObj } from "@storybook/react-vite";
import { storybookLayoutDecorator } from "@storybook-common";
import React from "react";

import { Boundary } from "../../common/boundary";
import type { BreadcrumbProps } from "../breadcrumbs/breadcrumb";

import { BreadcrumbsNext } from "./breadcrumbsNext";

const SAMPLE_ITEMS: BreadcrumbProps[] = [
{ text: "Home", href: "#", icon: "home" },
{ text: "Projects", href: "#", icon: "projects" },
{ text: "Blueprint", href: "#" },
{ text: "Components", href: "#" },
{ text: "Breadcrumbs" },
];

type StoryArgs = React.ComponentProps<typeof BreadcrumbsNext> & { width?: number };

const meta: Meta<StoryArgs> = {
title: "Core/BreadcrumbsNext",
component: BreadcrumbsNext,
decorators: [storybookLayoutDecorator],
tags: ["autodocs"],
args: {
items: SAMPLE_ITEMS,
collapseFrom: Boundary.START,
width: 400,
},
argTypes: {
collapseFrom: {
control: "select",
options: Object.values(Boundary),
},
minVisibleItems: {
control: "number",
},
width: { control: { type: "range", min: 100, max: 800, step: 10 } },
},
} satisfies Meta<StoryArgs>;

export default meta;
type Story = StoryObj<typeof meta>;

/**
* A basic breadcrumbs component with default styling. Adjust the width slider to see overflow behavior.
*/
export const Default: Story = {
render: ({ width, ...args }) => (
<div style={{ width }}>
<BreadcrumbsNext {...args} />
</div>
),
};

/**
* Interactive playground with all props toggleable via Storybook controls.
*/
export const Playground: Story = {
args: {
items: SAMPLE_ITEMS,
collapseFrom: Boundary.START,
minVisibleItems: 0,
},
render: ({ width, ...args }) => (
<div style={{ width }}>
<BreadcrumbsNext {...args} />
</div>
),
};
33 changes: 33 additions & 0 deletions packages/core/src/components/breadcrumbs-next/breadcrumbsNext.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2026 Palantir Technologies, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { DISPLAYNAME_PREFIX } from "../../common";
import { Breadcrumbs, type BreadcrumbsProps } from "../breadcrumbs/breadcrumbs";

export type BreadcrumbsNextProps = Omit<BreadcrumbsProps, "popoverProps">;

/**
* BreadcrumbsNext component.
*
* Thin wrapper around `Breadcrumbs` that omits the `popoverProps` prop.
*
* @see https://blueprintjs.com/docs/#core/components/breadcrumbs
*/
export const BreadcrumbsNext: React.FC<BreadcrumbsNextProps> = props => {
return <Breadcrumbs {...props} />;
};

BreadcrumbsNext.displayName = `${DISPLAYNAME_PREFIX}.BreadcrumbsNext`;
1 change: 1 addition & 0 deletions packages/core/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
export { Alert, type AlertProps } from "./alert/alert";
export { Breadcrumb, type BreadcrumbProps } from "./breadcrumbs/breadcrumb";
export { Breadcrumbs, type BreadcrumbsProps } from "./breadcrumbs/breadcrumbs";
export { BreadcrumbsNext, type BreadcrumbsNextProps } from "./breadcrumbs-next/breadcrumbsNext";
export { AnchorButton, Button } from "./button/buttons";
export type {
AnchorButtonProps,
Expand Down