development
Rubber duck icon
Rubber duck is an original glyphfox icon from the development set, drawn on the 24 by 24 grid with 5 shapes. Its closed shapes also give it a solid style, generated at build time. Tags: rubber duck, debugging, duck, bath toy, explain.
Sizes, weights and styles
Every glyphfox icon renders along three axes. The stroke grows a little below 24 px so small icons keep their presence.
Sizes
Weights
Styles
Copy the code
Pick a format. Each snippet uses the package entry point for that stack; the props work the same everywhere.
App.jsx
import { RubberDuckIcon } from 'glyphfox/react'; <RubberDuckIcon />
App.vue
<script setup> import { RubberDuckIcon } from 'glyphfox/vue'; </script> <template> <RubberDuckIcon /> </template>
App.svelte
<script> import { RubberDuckIcon } from 'glyphfox/svelte'; </script> <RubberDuckIcon />
app.component
import { GlyphFoxIcon, provideGlyphFox } from 'glyphfox-angular'; <gf-icon name="rubber-duck"></gf-icon>
index.html
<glyph-fox name="rubber-duck"></glyph-fox>
index.html
<script src="https://cdn.jsdelivr.net/npm/glyphfox@1"></script> <glyph-fox name="rubber-duck"></glyph-fox>
index.html
<span class="gf-rubber-duck" aria-hidden="true"></span>
rubber-duck.svg
<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" class="glyphfox glyphfox-rubber-duck" aria-hidden="true"><circle cx="9" cy="8" r="4"/><path d="M6.2 11.6C4.4 12.8 3.5 14.5 3.5 16.2 3.5 19 6.5 20.5 11 20.5h3.5c4 0 6.5-2.7 6.5-6.5V11l-3.3 2.6c-1.6-1.3-3.5-1.9-5.6-2"/><path d="M5.3 9.4H2.5c.3 1 1.3 1.6 3 1.6"/><path d="M9.5 7h.01"/><path d="M10 16c1.8 1.3 4 1.6 6.5 .6"/></svg>
data URI
data:image/svg+xml,%3Csvg 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' class='glyphfox glyphfox-rubber-duck' aria-hidden='true'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M6.2 11.6C4.4 12.8 3.5 14.5 3.5 16.2 3.5 19 6.5 20.5 11 20.5h3.5c4 0 6.5-2.7 6.5-6.5V11l-3.3 2.6c-1.6-1.3-3.5-1.9-5.6-2'/%3E%3Cpath d='M5.3 9.4H2.5c.3 1 1.3 1.6 3 1.6'/%3E%3Cpath d='M9.5 7h.01'/%3E%3Cpath d='M10 16c1.8 1.3 4 1.6 6.5 .6'/%3E%3C/svg%3E
index.html
<!-- copy node_modules/glyphfox/dist/sprite.svg to your public folder --> <svg width="24" height="24" aria-hidden="true"> <use href="/sprite.svg#gf-rubber-duck"></use> </svg>
index.html
<!-- main.js: import 'glyphfox/runtime'; --> <i data-glyph="rubber-duck"></i>
icon.js
import { renderToString } from 'glyphfox/core'; import iconRubberDuck from 'glyphfox/icons/rubber-duck'; const svg = renderToString(iconRubberDuck, { size: 24 }); // or, with every icon registered by name: // import { toSvg } from 'glyphfox'; // toSvg('rubber-duck', { size: 24 });
Details
| Name | rubber-duck |
|---|---|
| React, Vue and Svelte component | RubberDuckIcon |
| Icon data export | iconRubberDuck |
| Categories | development |
| Tags | rubber duck debugging duck bath toy explain |
| Styles | Outline, Duotone (fill of the closed shapes), Solid |
| Shapes | 5 |
| License | MIT |
With a modifier badge
Add a badge in any corner with modifier or the name syntax. The icon is cut around the badge, so the result still passes the icon rules.
rubber-duck+checkrubber-duck+plusrubber-duck+xrubber-duck+alertUse it in your stack
Guides with the install, the props and the pitfalls for each stack: