Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
Links allow a user to navigate between pages, scroll to a have page section, access files, or even to handle email addresses.
import { TextLink, IconLink, Link, TextLinkAsButton, IconLinkAsButton } from "@sharegate/orbit-ui";
A link style can optimized for text.
A text link can contain icons.
Non standard start icons can be provided to handle special cases. However, think twice before adding start icons, end icons should be your go to.
An external text link will render by default with rel="noopener noreferrer"
attribute.
You should avoid opening an external link in a new window or tab since it can be disorienting for people. Only do it when it's necessary. For more information, see W3C recommendation.
A link can use a different style.
A link can have disabled style, it's your responsability to make sure the link doesn't navigate anywhere when activated.
A link can vary in size.
A link can behave like a button by using the TextLinkAsButton
component.
To integrate with a third-party routing library like React Router any link component can be rendered as a React Router Link or as any other custom component.
A link content can be a single icon.
When using this variant, an accessible name must be provided through aria-label
prop. See WCAG practices.
An icon link can behave like a button by using the IconLinkAsButton
component.
A link can have a more subtle appareance and only be noticeable when focused.
A link content can be an image element.
A link can use a different shape to match his content shape on focus state.
import { TextLink } from "@sharegate/orbit-ui";
"left-icon", "text", "icon"
Name | Description | Default |
---|---|---|
autoFocus | Whether or not the link should autoFocus on render. numberfalsetrue | - |
children* | React children. string | number | false | true | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal | - |
disabled | Whether or not the link is disabled. falsetrue | - |
external | Whether or not this is an external link. falsetrue | - |
href | See MDN. string | - |
rel | See MDN. string | - |
size | A link can vary in size. "sm" | "md" | "inherit" | ResponsiveValue<"sm" | "md" | "inherit"> | - |
slot | Slot to render into. string | - |
target | See MDN. string | - |
underline | The underline style. "none""dotted""solid" | - |
variant | The link style to use. "negative""primary""accent" | - |
import { IconLink } from "@sharegate/orbit-ui";
Name | Description | Default |
---|---|---|
aria-label* | See WCAG. string | - |
autoFocus | Whether or not the link should autoFocus on render. numberfalsetrue | - |
children* | React children. string | number | false | true | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal | - |
disabled | Whether or not the link is disabled. falsetrue | - |
external | Whether or not this is an external link. falsetrue | - |
href | See MDN. string | - |
rel | See MDN. string | - |
slot | Slot to render into. string | - |
target | See MDN. string | - |
variant | The link style to use. "negative""primary""accent" | - |
import { Link } from "@sharegate/orbit-ui";
Name | Description | Default |
---|---|---|
autoFocus | Whether or not the link should autoFocus on render. numberfalsetrue | - |
disabled | Whether or not the link is disabled. falsetrue | - |
external | Whether or not this is an external link. falsetrue | - |
href | See MDN. string | - |
rel | See MDN. string | - |
shape | The link shape. "circular""rounded""box" | - |
slot | Slot to render into. string | - |
target | See MDN. string | - |
import { TextLinkAsButton } from "@sharegate/orbit-ui";
Name | Description | Default |
---|---|---|
autoFocus | Whether or not the link should autoFocus on render. numberfalsetrue | - |
children* | React children. string | number | false | true | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal | - |
disabled | Whether or not the link is disabled. falsetrue | - |
external | Whether or not this is an external link. falsetrue | - |
href | See MDN. string | - |
rel | See MDN. string | - |
size | A link can vary in size. "sm" | "md" | "inherit" | ResponsiveValue<"sm" | "md" | "inherit"> | - |
slot | Slot to render into. string | - |
target | See MDN. string | - |
underline | The underline style. "none""dotted""solid" | - |
variant | The link style to use. "negative""primary""accent" | - |
import { IconLinkAsButton } from "@sharegate/orbit-ui";
Name | Description | Default |
---|---|---|
aria-label* | See WCAG. string | - |
autoFocus | Whether or not the link should autoFocus on render. numberfalsetrue | - |
children* | React children. string | number | false | true | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal | - |
disabled | Whether or not the link is disabled. falsetrue | - |
external | Whether or not this is an external link. falsetrue | - |
href | See MDN. string | - |
rel | See MDN. string | - |
slot | Slot to render into. string | - |
target | See MDN. string | - |
variant | The link style to use. "negative""primary""accent" | - |