smooth-corners-vue

Smooth (continuous-curvature) corners for Vue 3. A directive, a composable and a plugin.
305
Install
npm install smooth-corners-vue
Latest Version:0.2.0
Vue:3
License:MIT
Last Updated:Oct 10, 2026
Links: GitHub  ·  npm
Maintainer: slimeryt

smooth-corners-vue

Smooth corners for Vue 3, built on smooth-corners-js.

npm install smooth-corners-vue

Plugin and directive

import { createApp } from 'vue';
import { SmoothCornersPlugin } from 'smooth-corners-vue';
import App from './App.vue';

createApp(App).use(SmoothCornersPlugin).mount('#app');
<template>
  <div v-smooth-corners="{ radius: 24, smoothing: 0.6 }">Hello</div>
</template>

To smooth every element that has a border-radius, pass auto:

app.use(SmoothCornersPlugin, { auto: true, smoothing: 0.6 });

Composable

<script setup lang="ts">
import { ref } from 'vue';
import { useSmoothCorners } from 'smooth-corners-vue';

const el = ref<HTMLElement | null>(null);
useSmoothCorners(el, () => ({ radius: 32 }));
</script>

<template>
  <div ref="el">Hello</div>
</template>

You can also import the directive directly: import { vSmoothCorners } from 'smooth-corners-vue'. Everything from smooth-corners-js is re-exported.

MIT

Related Packages

@lisse/vue

Vue composable and component for smooth-cornered (squircle) elements

9,748 344
@cornerkit/vue

Vue 3 components, composables, and directives for iOS-style squircle corners

1,491 13
@arcon.mobi/malic-ui

Vue 3 components for Apple-flavored interface surfaces: Liquid Glass, squircles,...

0
vue

The progressive JavaScript framework for building modern web UI.

468,054,189 54,906
vue

Version History

Version Released Vue License
0.2.0 ^3.2.0 MIT
Pre-releases (1)
Version Released License
0.0.0-stage