Hard Hat icon
boxicons:hard-hat
The Hard Hat icon (boxicons:hard-hat) is a free SVG icon from the Boxicons set. It is drawn on a 24 × 24 grid. Boxicons are released under the MIT license, which allows use in personal and commercial projects. Copy it as SVG, JSX, Vue or Svelte code, or download the SVG file.
SVG code
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M21 15c0-.61-.06-1.22-.18-1.81c-.12-.58-.29-1.15-.52-1.69a10 10 0 0 0-.83-1.53c-.32-.48-.69-.93-1.1-1.33c-.41-.41-.86-.78-1.33-1.1c-.48-.32-1-.6-1.53-.83c-.16-.07-.34-.12-.5-.18V5.01c0-.55-.45-1-1-1h-4c-.55 0-1 .45-1 1v1.52c-.17.06-.34.11-.5.18c-.53.23-1.05.51-1.53.83s-.92.69-1.33 1.1s-.78.86-1.1 1.33c-.32.48-.6 1-.83 1.53c-.23.54-.41 1.11-.53 1.69c-.12.59-.18 1.2-.18 1.81v3h-1v2h20v-2h-1v-3ZM5 15c0-.47.05-.95.14-1.41c.09-.45.23-.89.41-1.31s.39-.81.64-1.19a7.1 7.1 0 0 1 1.9-1.9c.29-.2.6-.36.91-.51V15h2V6h2v9h2V8.68c.32.15.62.32.91.51c.37.25.72.54 1.04.86s.6.66.85 1.04c.25.37.47.77.65 1.19s.32.86.41 1.31c.09.46.14.94.14 1.41v3H5z"/></svg>How to use the Hard Hat icon
React
import { Icon } from "@iconify/react";
<Icon icon="boxicons:hard-hat" width="24" />Vue
<script setup>
import { Icon } from "@iconify/vue";
</script>
<template>
<Icon icon="boxicons:hard-hat" width="24" />
</template>Svelte
<script>
import Icon from "@iconify/svelte";
</script>
<Icon icon="boxicons:hard-hat" width="24" />Tailwind CSS
<!-- @iconify/tailwind plugin -->
<span class="icon-[boxicons--hard-hat]"></span>UnoCSS
<!-- @unocss/preset-icons + @iconify-json/boxicons -->
<div class="i-boxicons:hard-hat"></div>Web component
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
<iconify-icon icon="boxicons:hard-hat"></iconify-icon>HTML image
<img src="https://iconyz.com/api/public/svg/boxicons/hard-hat.svg" alt="Hard Hat icon" width="24" height="24">Related icons in Boxicons
Hard Hat icon in other icon sets
Hard Hat icon FAQ
Is the Hard Hat icon free for commercial use?
Yes. Boxicons are released under the MIT license, which allows use in personal and commercial projects.
How do I use the Hard Hat icon in React?
Install @iconify/react and render <Icon icon="boxicons:hard-hat" />, or use “Copy code” on this page to get a standalone React component.
How do I add the Hard Hat icon to a web page?
Link the SVG file in an image tag: <img src="https://iconyz.com/api/public/svg/boxicons/hard-hat.svg" alt="Hard Hat icon">, or paste the SVG code inline to style it with CSS.