New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

svelte-pagination

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-pagination

Svelte raw component for pagination

0.0.1
latest
npm
Version published
Maintainers
1
Created
Source

svelte-pagination

NPM npm bundle size (minified + gzip)

Raw SvelteJS component for dynamic pagination. By applying styles, developer can acheive component in multiple forms.

Demo

Click here for Storybook link

REPL Link

Installation

npm install svelte-pagination

or

yarn add svelte-pagination

Usage

<script>
  import Pagination from "svelte-pagination";

  let checkedValue = 1;

  function handleChange(e) {
    const { selected } = e.detail;
    checkedValue = selected;
  }
</script>

<Pagination
  pageCount={100}
  marginPagesDisplayed={2}
  pageRangeDisplayed={5}
  onPageChange={handleChange} />
<br />

API

Props

Prop NameDescriptionDefault Value
pageCount10
pageRangeDisplayed2
marginPagesDisplayed3
previousLabel"Previous"
nextLabel"Next"
breakLabel"..."
hrefBuilder
initialPage
forcePage
disableInitialCallbackfalse
containerClassName
pageClassName
pageLinkClassName
activeClassName"selected"
activeLinkClassName
previousClassName"previous"
nextClassName"next"
previousLinkClassName
nextLinkClassName
disabledClassName"disabled"
breakClassName
breakLinkClassName
extraAriaContext
ariaLabelBuilder
startPageIndex1

Slots

NA

Events

Event NameDescriptionevent.detail info
change{event: event, selected}

Examples

Click here to view stories implementation

Credits

TBD

License

MIT

Keywords

svelte

FAQs

Package last updated on 13 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts