Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create <TextLink /> component #92

Closed
honzatmn opened this issue Mar 17, 2018 · 1 comment · Fixed by #139
Closed

Create <TextLink /> component #92

honzatmn opened this issue Mar 17, 2018 · 1 comment · Fixed by #139
Assignees

Comments

@honzatmn
Copy link
Contributor

honzatmn commented Mar 17, 2018

Description

Link is used usually in the paragraph text to show that something navigates you to another location.

Visual style

links

Parameters

Parameter Values Default
Style Primary, Secondary Primary
External [boolean] false

Note: When external is true, it opens links in new tab/window.

Design tokens

For all configurations:
font-weight: $fontWeightLinks

Based on selected configuration:

Parameter:Value property: $token
Style:Primary color: $colorLinkPrimary
Style:Secondary color: $colorLinkSecondary
text-decoration: underline // token not needed, just visual change

Hover behavior

There are two things that will happen when the user hovers any link:

  • Underline appears
  • The text color will change to the darker version of $colorLinkPrimary color (for both styles, actually). For darkening percentage use design token $modifierDarkenHover

Other things to mention

  • If it’s possible, it should be used only inside <Text> or <Headline> components and it should inherit Size from parent text.
  • We are showing pointer cursor for every link
  • For the visited state of links, please use original link color (at least for now, it’s possible that this will change in future).
  • For focus state please keep outline there, until we decide what to do next with visited and focus state.

Some inspiration from other’s React components for heading component:

https://polaris.shopify.com/components/navigation/link
https://instacart.github.io/Snacks/#link-1
http://grommet.io/docs/anchor
http://design-system.pluralsight.com/components/link/
http://www.jetbrains.org/ring-ui/link.html

@vepor vepor self-assigned this Apr 11, 2018
@honzatmn
Copy link
Contributor Author

After discussion with @wEprous, we added few new tokens for taking control of link underline.

Token Value
$textDecorationLinkPrimary none
$textDecorationLinkPrimaryHover underline
$textDecorationLinkSecondary underline
$textDecorationLinkSecondaryHover underline

@vepor vepor mentioned this issue Apr 17, 2018
2 tasks
@honzatmn honzatmn added this to the Orbit Components 0.1 milestone Apr 26, 2018
tomashapl pushed a commit that referenced this issue Sep 11, 2019
vepor pushed a commit that referenced this issue Aug 27, 2020
vepor pushed a commit that referenced this issue Nov 4, 2020
bul-nick-al pushed a commit to bul-nick-al/orbit that referenced this issue Aug 19, 2022
…eview-to-show-how-to-scroll-to-specific-item

Update HorizontalScroll component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants