Skip to main content
100%

Partial Fill Icon

✓ Published0🌍 Public
Aavcwisesa
Last edited Apr 5, 2021
Created on Mar 19, 2021
Forked from React Starter

This example shows a single tree icon rendered as an SVG path, where a linear gradient fills 40% of the shape with green and the remaining portion with a muted gray-green. The fill amount is passed as a prop to a React component, with the gradient stops using that value to create the partial-fill effect. The code uses React 16.13.1 to render the SVG, and the gradient is defined with `<linearGradient>` and `<stop>` elements, using `gradientUnits="userSpaceOnUse"` to position the fill relative to the icon’s bounding box. The static fill amount is hard-coded to 0.4 in the `App` component.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes