Sun icon
duo-icons:sun
The Sun icon (duo-icons:sun) is a free SVG icon from the Duoicons set by fernandcf. It is drawn on a 24 × 24 grid. Duoicons 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="M12 18.5a1.5 1.5 0 0 1 1.493 1.356L13.5 20v1a1.5 1.5 0 0 1-2.993.144L10.5 21v-1a1.5 1.5 0 0 1 1.5-1.5m0-17a1.5 1.5 0 0 1 1.493 1.356L13.5 3v1a1.5 1.5 0 0 1-2.993.144L10.5 4V3A1.5 1.5 0 0 1 12 1.5m5.303 3.075a1.5 1.5 0 0 1 2.225 2.008l-.103.114l-.707.707a1.5 1.5 0 0 1-2.225-2.008l.103-.114zm-12.728 0a1.5 1.5 0 0 1 2.008-.103l.114.103l.707.707a1.5 1.5 0 0 1-2.008 2.225l-.114-.103l-.707-.707a1.5 1.5 0 0 1 0-2.122M21 10.5a1.5 1.5 0 0 1 .144 2.993L21 13.5h-1a1.5 1.5 0 0 1-.144-2.993L20 10.5zm-17 0a1.5 1.5 0 0 1 .144 2.993L4 13.5H3a1.5 1.5 0 0 1-.144-2.993L3 10.5z" class="duoicon-primary-layer"/><path fill="currentColor" d="M12 6c4.619 0 7.506 5 5.196 9A6 6 0 0 1 12 18c-4.619 0-7.506-5-5.196-9A6 6 0 0 1 12 6" class="duoicon-secondary-layer" opacity=".3"/><path fill="currentColor" d="M5.282 16.596a1.5 1.5 0 0 1 2.225 2.008l-.103.114l-.707.707a1.5 1.5 0 0 1-2.225-2.008l.103-.114zm11.314 0a1.5 1.5 0 0 1 2.008-.103l.114.103l.707.707a1.5 1.5 0 0 1-2.008 2.225l-.114-.103l-.707-.707a1.5 1.5 0 0 1 0-2.122" class="duoicon-primary-layer"/></svg>How to use the Sun icon
React
import { Icon } from "@iconify/react";
<Icon icon="duo-icons:sun" width="24" />Vue
<script setup>
import { Icon } from "@iconify/vue";
</script>
<template>
<Icon icon="duo-icons:sun" width="24" />
</template>Svelte
<script>
import Icon from "@iconify/svelte";
</script>
<Icon icon="duo-icons:sun" width="24" />Tailwind CSS
<!-- @iconify/tailwind plugin -->
<span class="icon-[duo-icons--sun]"></span>UnoCSS
<!-- @unocss/preset-icons + @iconify-json/duo-icons -->
<div class="i-duo-icons:sun"></div>Web component
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
<iconify-icon icon="duo-icons:sun"></iconify-icon>HTML image
<img src="https://iconyz.com/api/public/svg/duo-icons/sun.svg" alt="Sun icon" width="24" height="24">Sun icon in other icon sets
Sun icon FAQ
Is the Sun icon free for commercial use?
Yes. Duoicons are released under the MIT license, which allows use in personal and commercial projects.
How do I use the Sun icon in React?
Install @iconify/react and render <Icon icon="duo-icons:sun" />, or use “Copy code” on this page to get a standalone React component.
How do I add the Sun icon to a web page?
Link the SVG file in an image tag: <img src="https://iconyz.com/api/public/svg/duo-icons/sun.svg" alt="Sun icon">, or paste the SVG code inline to style it with CSS.