[Feature Request]: Allow React component for SideNavigation & TopNavigation Links
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start by reading the SideNavigation and TopNavigation APIs and how they currently render links; the issue names no files or tests. Review the discussion for any decision on how a custom React component should fit those APIs. Done means both navigation components can support the requested custom link component while retaining their existing link options.
Written by the indexing model from the issue text.
Description
Description
Hi,
I'm using Gatsby and it work pretty well, my only concern is that Gatsby has the component Link which is super optimized for users
The component drives a powerful performance feature called preloading. Preloading is used to prefetch page resources so that the resources are available by the time the user navigates to the page.
We use the browser’s Intersection Observer API to observe when a component enters the user viewport and then start a low-priority request for the linked page’s resources. Then when a user moves their mouse over a link and the onMouseOver event is triggered, we upgrade the fetches to high-priority.
I can feel the speed difference by using it or not.
Is it possible to add an option to define a react component directly for the link ?
Something like:
<SideNavigation
items={[
{
type: "section",
text: "Collections",
items: [
{
type: "cmp",
value: <Link href="/page2"></Link>,
},
{
type: "link",
text: "Test",
href: "/test",
},
],
},
...
<TopNavigation
identity={{
href: "/",
cmp: <Link href="/page3"></Link>,
}}
...
Or is there a way to do it already?
Code of Conduct
- I agree to follow this project's Code of Conduct
- I checked the current issues for duplicate requests
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 248
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 83
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudscape-design/components
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
cloudscape-design/components#5184 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cloudscape-design/components#5152 · 1 comment ·
Maintainers usually reply within 2 days
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 15/100
cloudscape-design/components#5149 · 1 comment ·
Maintainers usually reply within 2 days
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
cloudscape-design/components#5117 · 2 comments ·
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
cloudscape-design/components#5106 · 1 comment ·
Maintainers usually reply within 2 days
All issues in cloudscape-design/components
Similar issues
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixPossibly taken @ItsDeadlyProgrammer claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
appsmithorg/appsmith#42471 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ehmpathy/rhachet-roles-bhrain#705 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Status: Triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
mermaid-js/mermaid#8546 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
braintrustdata/braintrust-sdk-javascript#2659 ·
Maintainers usually reply within 1 day