Skip to contentGet startedTokensComponents@hackclub/theme@hackclub/tokens@hackclub/css-base@hackclub/components@hackclub/meta GitHub
Variants
Join the community Start a club Learn more Donate Cancel
<hc-button arrow>Join the community</hc-button>
<hc-button variant="red">Start a club</hc-button>
<hc-button variant="secondary">Learn more</hc-button>
<hc-button variant="outline">Donate</hc-button>
<hc-button variant="ghost">Cancel</hc-button>
Sizes, icons and links
Small Medium Large GitHub Disabled
<hc-button size="sm">Small</hc-button>
<hc-button>Medium</hc-button>
<hc-button size="lg" arrow>Large</hc-button>
<hc-button href="https://github.com/hackclub" target="_blank" variant="secondary">
  <hc-icon slot="start" glyph="github" size="24"></hc-icon>
  GitHub
</hc-button>
<hc-button disabled>Disabled</hc-button>

API

Attributes

NameTypeDefaultDescription
variant"primary" | "red" | "secondary" | "outline" | "ghost""primary"Visual style
size"sm" | "md" | "lg""md"Height and padding
hrefstringRenders an <a> instead of a <button>
target, rel, downloadstringPassed to the link. rel defaults to noopener noreferrer for _blank
type"submit" | "reset" | "button""submit"Form behavior
arrowbooleanfalseShow the trailing arrow
disabledbooleanfalseDisable the button

Slots

NameDescription
(default)Label
startBefore the label, e.g. an <hc-icon>
endAfter the label; replaces the arrow

CSS parts

NameDescription
controlThe inner <a> or <button>
arrowThe arrow wrapper

CSS custom properties

NameDescription
--hc-button-bg / --hc-button-fgResting colors
--hc-button-bg-hover / --hc-button-fg-hoverHover colors
--hc-button-height, --hc-button-padding, --hc-button-font-sizeSizing
Next: Card

The design system behind hackclub.com.
Made with <3 by Lamparter.

Get startedTokensComponents@hackclub/theme@hackclub/tokens@hackclub/css-base@hackclub/components@hackclub/metaWebsiteBrand guideIconshackclub/site