A brimmed hat with a band, for headwear, fashion, a fedora and a sun hat. On a 24×24 grid in stroke, two-tone, duotone and fill, free under MIT.
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M2 14C2 16.7614 4.23858 19 7 19H17C19.7614 19 22 16.7614 22 14M5.5 18.5L7.47557 6.6712C7.61331 5.7068 8.32851 5 9.16654 5H9.61971C9.77511 5 9.92751 5.0493 10.0607 5.1425L11.3385 6.037C11.5383 6.1769 11.767 6.2507 12 6.2507C12.233 6.2507 12.4617 6.1769 12.6615 6.037L13.9393 5.1425C14.0725 5.0493 14.2249 5 14.3803 5H14.8335C15.6715 5 16.3867 5.7068 16.5244 6.6712L18.5 18.5M6.57146 13H17.4285" fill="none"/>
</svg>Also called
What someone searching for this drawing would have typed instead. These are the words the browser's search matches on.
- fedora
- cowboy hat
- headwear
- sun hat
- trilby
- fashion
Related icons
The rest of the hat family first, then the Commerce shelf.
FAQ
Answered from hat's own facts: its shelf, the styles it was drawn in, its siblings and its dates.
- What is the hat icon for?
- A brimmed hat with a band, for headwear, fashion, a fedora and a sun hat. It is filed under Commerce in Keyline Icons, drawn on the same 24×24 grid as the rest of the set. People look for it as fedora, cowboy hat, headwear, sun hat, trilby and fashion, and the browser's search matches all of those.
- What styles does the hat icon come in?
- All four: stroke, two-tone, duotone and fill. They are drawn from the same geometry, so swapping style never moves anything.
- Is there a square or circle version of hat?
- No. hat is drawn as a bare glyph, and the set has no boxed variant of it.
- What other icons go with hat?
- hat-glasses, badge-percent, bow-tie, box, briefcase and briefcase-arrow-down, and 12 more, all shown below. The hat family is listed first, then the rest of the Commerce shelf, so the row under this one is the useful one even where a shelf runs long.
- How do I import hat in React?
- <Hat /> is the component, and the style decides the module: stroke from "@keyline-icons/react", two-tone from "@keyline-icons/react/two-tone", duotone from "@keyline-icons/react/duotone" and fill from "@keyline-icons/react/fill". It takes the usual SVG props plus a size, so <Hat size={16} /> and className="size-4" both work, and there is no provider or theme to set up.
- Where is the hat SVG?
- icons/stroke/hat.svg, icons/two-tone/hat.svg, icons/duotone/hat.svg and icons/fill/hat.svg in the repository, normalised: no wrapper, no ids and no classes to strip out. The tabs above hand you the same drawing as SVG or JSX without the download, and neither needs an install.
- When was hat added to the set?
- Added 21 Nov 2026. It ships in v2.9.0, so an install at that version or later has it.
Questions about the set rather than about this drawing are answered where they belong. The home page covers what the set is, how the three styles differ, why some icons come boxed and where the Figma file is; installing the set in a shadcn/ui project covers the React package, the CLI and using an icon without React. The MIT licence is stated in the footer of every page.