Rim button

A glossy button with a thin brushed-metal rim, in a colour and in white. The arrow nudges forward on hover.

Options

Size
Colour

Code

import "./rim-button.css";

const arrow = (
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
    <path d="M4 12H20M14 18L20 12L14 6" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" />
  </svg>
);

/* white gives the pale version. withArrow adds the arrow that nudges forward on hover. */
export function RimButton({ white = false, withArrow = false, children, ...rest }) {
  return (
    <button className={"dh-rim-button" + (white ? " dh-rim-button--white" : "")} type="button" {...rest}>
      {children}
      {withArrow && arrow}
    </button>
  );
}