Circular Progress

Change value by animating the first value before the comma inside the stroke-dasharray path attribute.
<div class="sds-circularProgress">
    <svg viewBox="0 0 36 36" class="">

        <path class="sds-circularProgress__shape" stroke-dasharray="50, 100" d="M18 2.0845
						  a 15.9155 15.9155 0 0 1 0 31.831
						  a 15.9155 15.9155 0 0 1 0 -31.831" />
    </svg>
</div>
<div class="{{ namespace }}circularProgress{% for mod in modifiers %} {{ mod }}{% endfor %}{% for mod in classes %} {{ mod }}{% endfor %}">
	<svg viewBox="0 0 36 36" class="">
		{% if circleShapeBg %}
		<circle class="{{ namespace }}circularProgress__bgShape" cx="18" cy="18" r="16" stroke="#000" stroke-width="1.5" fill="none" />
		{% endif %}
		<path class="{{ namespace }}circularProgress__shape"
			  stroke-dasharray="{{ progress }}, 100" d="M18 2.0845
						  a 15.9155 15.9155 0 0 1 0 31.831
						  a 15.9155 15.9155 0 0 1 0 -31.831"/>
	</svg>
</div>
  • Content:
    /* variables specific to current element */
    
    $element-specific-variables: "";
    
    .#{$namespace}circularProgress {
    
    	/* Save root element context for easy access if nesting is needed */
    
    	$self: &;
    
    	/* properties of current element  + media queries */
    
    
    	/* Pseudo Elements */
    
    	&::before {
    	}
    
    	&::after {
    	}
    
    	/*
    	Include elements that are linked to the current element but have to reside at the root level of the stylesheet
    	(e.g: keyframes)
    	*/
    	@at-root {
    		@keyframes progress {
    			0% {
    				stroke-dasharray: 0 100;
    			}
    		}
    	}
    
    
    	/* children - write selector in full in comments in order to facilitate search */
    
    	// circularProgress__childElement
    	&__shape {
    
    		// follows same logic as parent
    
    		@include custom-prop-fallback("stroke","sys-color-text-secondary-vivid");
    		fill: none;
    		stroke-width: 2;
    		stroke-linecap: round;
    		transition: all 0.1s linear;
    
    	}
    
    
    	/* modifiers */
    
    	// circularProgress -altStyle
    	&.-altStyle {
    
    		// follows same logic as base element
    
    	}
    
    	/* random parent element */
    	/* 
    	*
    	*   Syntax : .randomParentElt & {}
    	*
    	*/
    
    	/* Pseudo Classes */
    
    	&:hover {
    		@media (hover: hover) {
    
    		}
    	}
    
    	&:focus {
    	}
    
    	&:active {
    	}
    
    	&:focus,
    	&:active {
    	}
    
    }
  • URL: /components/raw/snet-circular-progress/_circular-progress.scss
  • Filesystem Path: components/snet/atoms/circular-progress/_circular-progress.scss
  • Size: 1.2 KB