The pencil icon: a 24 by 24 stroke glyph that takes its colour from the text around it.
The pencil icon: a 24 by 24 stroke glyph that takes its colour from the text around it.
Usage
1import { PencilIcon } from '@behivetech/icons.pencil';23<PencilIcon />4<PencilIcon size="lg" titleAccess="Pencil" />
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.
Examples
Open all 2 →Pencil Icon Sizes
1const PencilIconSizes = () => (2 <>3 <PencilIcon size="sm" />4 <PencilIcon />5 <PencilIcon size="lg" />6 <PencilIcon size="xl" />7 </>8);910render(<PencilIconSizes />);
Named Pencil Icon
1const NamedPencilIcon = () => <PencilIcon titleAccess="Pencil" />;23render(<NamedPencilIcon />);
Properties
PencilIcon props
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names to merge with the component root element |
ref | Ref<SVGSVGElement> | — | Ref to the root svg element |
size | "sm" | "md" | "lg" | "xl" | — | Controls width/height; defaults to md |
titleAccess | string | — | 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
PencilIcon function
The pencil icon: a stroke glyph on a 24 by 24 grid that inherits the text colour.
PencilIcon(props: import("@behivetech/icons.base").IconBaseProps): import("react").ReactNode| Parameter | Type | Default | Description |
|---|---|---|---|
props | import("@behivetech/icons.base").IconBaseProps | — | — |
Returns import("react").ReactNode