homepage

Brown Markup Library

Jump Link

A spirited little link that really tells the user they are going somewhere.

Rendered Component

My Brown (opens in a new tab)

Markup

HTML

<a
  href="https://my.brown.edu"
  class="jump-link"
  target="_blank"
  rel="noopener nofollow"
>
  <span class="jump-link-icon-wrapper">
    <svg
      aria-hidden="true"
      viewBox="0 0 14 11"
      width="15"
      data-testid="ArrowOut"
    >
      <title>arrow pointing outward</title>
      <path
        d="M1.014 9.43c-.095.088-.152.133-.241.133H.709A.27.27 0 01.5 9.309C.633 5.633 2.938 3.335 7 3.335V.898c0-.108.057-.197.152-.241a.287.287 0 01.286.025l5.954 4.609c.064.044.108.12.108.209a.255.255 0 01-.108.21l-5.954 4.608a.229.229 0 01-.165.057.285.285 0 01-.12-.032.259.259 0 01-.153-.241V7.665c-2.71 0-5.008.545-5.986 1.764z"
        fill-rule="evenodd"
      ></path>
    </svg>
  </span>
  <span class="jump-link-title"
    >My Brown <span class="visibly_hidden">(opens in a new tab)</span></span
  >
</a>

Styling

CSS

.jump-link {
  position: relative;
  border-bottom: 1px solid rgb(183, 176, 156);
  display: block;
  padding: 13px 0;
  margin-left: 2rem;
  text-decoration: none;
  color: black;
  font-family: CircularStd, Arial, Helvetica, sans-serif;
  width: fit-content;
  transition: color 0.25s;
  svg {
    fill: #ffc72c;
    transition: fill 0.25s;
  }
}
.jump-link:hover {
  color: #c00404;
  svg {
    fill: #c00404;
  }
}
.jump-link:hover:after {
  transition: transform 0.375s;
  transform: scaleX(1);
}
.jump-link:after {
  height: 2px;
  width: 100%;
  position: absolute;
  top: 100%;
  left: 0;
  background: #c00404;
  content: "";
  margin-top: -1px;
  transform: scaleX(0);
  transform-origin: left center;
}
.jump-link-icon-wrapper {
  position: absolute;
  top: 22px;
  right: 100%;
  margin-right: 12px;
  transform: translate(0, -50%);
}
.jump-link-title {
  font-weight: 400;
  display: block;
  font-size: 0.875rem;
  line-height: 1.42857;
  vertical-align: top;
}
.visibly_hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

Example from the Brown React Component Library

Brown React Component Library Code