Draft
Conversation
Add initial Breadcrumbs component skeleton with proposed API, Storybook stories, and basic tests for RFC review. Made-with: Cursor
Refactor the StyledLink component to enhance hover effects and ensure consistent text color based on theme. This improves accessibility and visual feedback for users.
|
Contributor
📚 Storybook Preview Deployed✅ Preview URL: https://click-l7f6c1h0i-clickhouse.vercel.app Built from commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Breadcrumbs navigation component that displays the user's current location within a hierarchy, allowing quick navigation to parent pages. Supports icons, auto-collapsing middle items into an ellipsis dropdown, and active page indication.
Component name:
BreadcrumbsType: New Component
Motivation
Why is this component needed, or why does the existing one need to change?
Design reference
Proposed API
Show the intended public API with usage examples.
Basic usage — all items visible
Separators are auto-inserted between items.
Collapsed — middle items hidden behind ellipsis dropdown
When
maxItemsis set and the item count exceeds it, middle items collapse into a...button. Clicking the ellipsis opens a popover dropdown listing the hidden items.Fine-grained collapse control
Responsive usage
The consumer handles responsive behavior externally:
Props
BreadcrumbsPropschildrenReactNodeBreadcrumbItemelementsmaxItemsnumberundefinedundefined, all items are shownitemsBeforeCollapsenumber1itemsAfterCollapsenumber1separatorReactNode<Icon name="chevron-right" />BreadcrumbItemPropschildrenReactNodeiconIconNameundefinedactivebooleanfalsehrefstringundefinedCollapse behavior
maxItemsitemsBeforeCollapseitemsAfterCollapseundefined211...+ last421...+ last211classNameandrefforwardingVariants & states
List the variants and states the component should support:
docs.typography.breadcrumbstokens)Accessibility
<nav>,<ol>,<li>,<a>)aria-label="Breadcrumb",aria-current="page"on active item)Theming
src/theme/tokens(no hardcoded colors, spacing, or font sizes)theme.click.docs.typography.breadcrumbs.default— link itemstheme.click.docs.typography.breadcrumbs.active— current page itemtheme.click.global.color.text.muted— link item colortheme.click.global.color.text.default— active item colortheme.click.genericMenu.*— ellipsis dropdown stylingImplementation checklist
src/components/Breadcrumbs/Breadcrumbs.tsxsrc/components/index.tsstyled-componentsusing theme tokensanytypes usedTesting
Breadcrumbs.test.tsxtoHaveAccessibleName)Breadcrumbs.stories.tsxDocumentation
Changeset
yarn changeset:addhas been run and the changeset file is includedminorfor new components,patchfor changes/fixes)Security checklist
dangerouslySetInnerHTMLRollout & migration (for component changes only)
N/A — new component.
Open questions
List any unresolved decisions or areas where you'd like reviewer feedback.
BreadcrumbItemaccept anasprop (e.g., for React RouterLinkintegration)?Popoveror a custom implementation?maxItemssupport a responsive object like{ sm: 2, md: 4 }?Preview
Link to a deployed Storybook preview or attach screenshots.
Storybook preview will be available once CI deploys.