
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@react-md/link
Advanced tools
The base package for including a theme for react-md. This is required by most other packages.
Create simple links from react-md with a customizable theme. The provided Link
component can easily integrate with
react-router,
@reach/router, and theoretically any other
routing library if needed.
This package also exports a great screen-reader and keyboard accessibility
helper: SkipToMainContent that will allow a user to immediately jump to the
main content of the page.
npm install --save @react-md/link
It is also recommended to install the following packages to the full experience.
npm install --save @react-md/theme @react-md/typography
You should check out the full documentation for live examples and more customization information, but an example usage is shown below.
import React, { ReactElement } from "react";
import { render } from "react-dom";
import {
Link as ReactRouterLink,
LinkProps as ReactRouterLinkProps,
BrowserRouter,
} from "react-router-dom";
import { Link as ReactMDLink, LinkProps as RMDLinkProps } from "@react-md/link";
export type LinkProps = RDMLinkProps & ReactRouterLinkProps;
function Link(props: linkProps): ReactElement {
return <ReactMDLink {...props} component={ReactRouterLink} />;
}
function Home(): ReactElement {
return <h1>Home page!</h1>;
}
function About(): ReactElement {
return <h1>About page!</h1>;
}
function App(): ReactElement {
return (
<BrowserRouter>
<Link to="/">Home</Link>
<Link to="/about">About</Link>
<Route exact path="/" component={Home} />
<Route path="/about" component={About} />
</BrowserRouter>
);
}
render(<App />, document.getElementById("root"));
If you are using the @react-md/layout package, this component is already
built-in to help out! However, this component can also be used within full page
dialogs or custom screens to be able to jump to a specific element in the page.
import React, { ReactElement } from "react";
import { render } from "react-dom";
import {
Dialog,
DialogHeader,
DialogContent,
DialogFooter,
} from "@react-md/dialog";
import { SkipToMainContent } from "@react-md/link";
const noop = (): void => {};
function App(): ReactElement {
return (
<Dialog
id="full-page-dialog"
aria-labelledby="full-page-dialog-title"
visible
onRequestClose={noop}
>
<DialogHeader>
<SkipToMainContent mainId="full-page-dialog-content" />
{/* pretend 100 focusable things before main content */}
</DialogHeader>
<DialogContent id="full-page-dialog-content">
<p>Here is some content</p>
</DialogContent>
</Dialog>
);
}
render(<App />, document.getElementById("root"));
FAQs
The base package for including a theme for react-md. This is required by most other packages.
The npm package @react-md/link receives a total of 967 weekly downloads. As such, @react-md/link popularity was classified as not popular.
We found that @react-md/link demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.