2026-03-20 17:04:28 +01:00
---
title : Stroke width - Vue
2026-09-04 16:38:01 +02:00
description : Learn how to adjust the stroke width of icons in your Vue application using the `strokeWidth` prop or adjust the strokeWidth appearance using the `nonScalingStroke` prop.
2026-03-20 17:04:28 +01:00
---
2026-09-04 16:38:01 +02:00
2026-03-20 17:04:28 +01:00
<script setup>
import Sandpack from '~/.vitepress/theme/components/editors/SandpackVue.vue'
</script>
# Stroke width
All icons are designed with SVG elements using strokes.
These have a default stroke width of `2px` .
The `strokeWidth` can be adjusted to create a different look of the icons.
## Adjusting stroke width with `strokeWidth` prop
::: sandpack {template=vue showTabs=false editorHeight=300 editorWidthPercentage=60 dependencies="@lucide/vue "}
```vue src/App.vue [active]
<script setup>
2026-09-04 16:38:01 +02:00
import { FolderLock } from '@lucide/vue';
2026-03-20 17:04:28 +01:00
</script>
<template>
<FolderLock :strokeWidth="1" />
</template>
` ``
2026-09-04 16:38:01 +02:00
2026-03-20 17:04:28 +01:00
:::
2026-09-04 16:38:01 +02:00
## Non-scaling strokes
2026-03-20 17:04:28 +01:00
2026-09-04 16:38:01 +02:00
When adjusting the ` size` prop the size of the stroke width will be relative to the size of the icon, this is the default SVG behavior. The ` nonScalingStroke` prop is introduced to adjust this behavior to make the stroke width constant no matter the size of the icon.
2026-03-20 17:04:28 +01:00
2026-09-04 16:38:01 +02:00
This means that when ` nonScalingStroke` is enabled and the ` size` of the icons is set to ` 48px` the ` strokeWidth` will still be ` 2px` on the screen.
2026-03-20 17:04:28 +01:00
Note ` 2px` is the default stroke width for a Lucide icon, this can be adjusted to all sizes.
2026-09-04 16:38:01 +02:00
<!--@include: ../../../images/non-scaling-stroke-compare.svg -->
2026-03-20 17:04:28 +01:00
2026-09-04 16:38:01 +02:00
### Adjusting stroke width with ` nonScalingStroke` prop
2026-03-20 17:04:28 +01:00
2026-09-04 16:38:01 +02:00
Setting ` nonScalingStroke` to ` true` will make the stroke width non-scaling.
2026-03-20 17:04:28 +01:00
::: sandpack {template=vue showTabs=false editorHeight=320 editorWidthPercentage=60 dependencies="@lucide/vue"}
` ``vue src/App.vue [active]
<script setup>
2026-09-04 16:38:01 +02:00
import { RollerCoaster } from '@lucide/vue';
2026-03-20 17:04:28 +01:00
</script>
<template>
<RollerCoaster
:size="96"
2026-09-04 16:38:01 +02:00
nonScalingStroke
2026-03-20 17:04:28 +01:00
/>
</template>
` ``
2026-09-04 16:38:01 +02:00
2026-03-20 17:04:28 +01:00
:::