Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 1.4 KB

README.md

File metadata and controls

51 lines (39 loc) · 1.4 KB

solid-number-flow

solid-number-flow

Demo

A SolidJS component to transition, format, and localize numbers. Forked from @barvian/number-flow.

Quick start

Install it:

npm i solid-number-flow
# or
yarn add solid-number-flow
# or
pnpm add solid-number-flow
# or
bun add solid-number-flow

Use it:

import solid-number-flow from 'solid-number-flow'

export default function Page() {
  const [value, setValue] = createSignal(398.43);

  return (
    <>
      <button onClick={() => setValue(Math.random() * 1000)}>Random</button>
      <NumberFlow value={value()} />
    </>
  )
}