The key icon: a 24 by 24 stroke glyph that takes its colour from the text around it.

pnpm add @behivetech/icons.key
  • icon

This is the snapshot of v0.1.0, the current version, as recorded on 2026-11-10. The live page runs its examples →

The key icon: a 24 by 24 stroke glyph that takes its colour from the text around it.

Usage

1import { KeyIcon } from '@behivetech/icons.key';
2
3<KeyIcon />
4<KeyIcon size="lg" titleAccess="Key" />

The icon is hidden from assistive technology unless it is named: pass titleAccess (rendered as the svg's <title>) or aria-label. It sizes through size (sm, md, lg, xl) with the stylesheet of @behivetech/icons.base, which the app imports once. The default export is the same component.

Properties

KeyIcon props

PropTypeDefaultDescription
classNamestring—Additional class names to merge with the component root element
refRef<SVGSVGElement>—Ref to the root svg element
size"sm" | "md" | "lg" | "xl"—Controls width/height; defaults to md
titleAccessstring—Accessible name of the icon, rendered as the svg's `<title>`. When set the icon is exposed as an image with this name; without it (and without `aria-label` or `aria-labelledby`) the icon is decorative and hidden from assistive technology. Pass an already translated string.

Functions

KeyIcon function

The key icon: a stroke glyph on a 24 by 24 grid that inherits the text colour.

KeyIcon(props: import("@behivetech/icons.base").IconBaseProps): import("react").ReactNode
ParameterTypeDefaultDescription
propsimport("@behivetech/icons.base").IconBaseProps——

Returns import("react").ReactNode