VITE+ - The Unified Toolchain for the Web
First stable release of vue-clamp for Vue 3.
Breaking changes
- Vue 3 is now required. The
0.xline targeted Vue 2. - The package no longer has a default export. Import named exports such as
LineClamp,
InlineClamp, orWrapClamp. - The multiline component now takes its source text from the
textprop. The default slot is no
longer the clamped text source. - The root tag prop was renamed from
tagtoas. autoresizewas removed.- Expansion now uses Vue 3
v-model:expandedinstead of the Vue 2.syncpattern. - If you style component internals, switch to the documented
data-parthooks. - The old
Clampalias was removed. UseLineClamp.
New in 1.0
InlineClampfor one-line clamping with optionalsplit(text).WrapClampfor wrapped atomic items such as tags, chips, and selections.- Built-in TypeScript types for props, slots, emits, and exposed methods.
- Numeric
locationratios forLineClamp, in addition tostart,middle, andend.
Migration
- Read the full migration guide:
MIGRATION.md