@lostui/utils

Lost UI Utils is a collection of utility functions for Utility first components based on Vue 3 composition API.
2,460
Install
npm install @lostui/utils
Latest Version:0.0.4
Vue:3
Last Updated:May 29, 2024
Links: npm
Maintainer: sokamoka

Lost UI Utils

Lost UI Utils is a collection of utility functions for Utility first components based on Vue 3 composition API.

Motivation

In the course of my work, I have created several repetitive utility tools that I thought were worthy of being easily reusable in a separate package.

Install

#npm
npm install @lostui/utils

#pnpm
pnpm add @lostui/utils

UI Utils

Composables

  • useDataTable
  • useFetchMore
  • useLazyLoadingState
  • usePagination
  • useShowPassword
  • useSort
  • useScrollToPromise
  • useValidation

Components

  • FetchMoreObserver

Utils

  • SortBy Intl.collator sorting
  • nextFrame
  • scrollTo
  • delay
  • animationEnd

Composables

useScrollToPromise

  import { useScrollToPromise } from '@lostui/utils'

  const scrollTo = useScrollToPromise()
  
  async function goTo() {
    await scrollTo('#item-1')
    await scrollTo('#item-2')
  }

Components

FetchMoreObserver

import { FetchMoreObserver } from '@lostui/utils/components';
<FetchMoreObserver
  :options="{ rootMargin: '200px' }"
  @intersect="fetchMore"
>
  <button @click="more">More</button>
</FetchMoreObserver>

Version History

Version Released Vue License
0.0.4 ^3.4.15
0.0.3 ^3.4.15
0.0.2 ^3.4.15
0.0.1 ^3.4.15
0.0.0 ^3.4.15