svelte-virtualized-auto-sizer
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

svelte-virtualized-auto-sizer

Svelte port of the AutoSizer component from react-virtualized.

High-order component that automatically adjusts the width and height of a single child. Read more about this component in my blog

NPM

Install

npm install --save-dev svelte-virtualized-auto-sizer

Documentation

Please see API documentation of "AutoSizer" in react-virtualized package here.

On the props style and children are removed, since these are React-specific.

Instead, use slot props:

<AutoSizer let:width={childWidth} let:height={childHeight}>
    <div 
    style={"width:"+childWidth+"px;height:"+childHeight+"px;"}
    >Test</div>
</AutoSizer>

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i svelte-virtualized-auto-sizer

    Weekly Downloads

    4

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    17.1 kB

    Total Files

    7

    Last publish

    Collaborators

    • micha-lmxt