Skip to content
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
357c958
refactor: use simpler grid area definition for items
nerdyman Jun 6, 2025
db73f08
refactor: remove zoom scale calculation, not needed now that we use p…
nerdyman Jun 6, 2025
c3d328c
perf: use css variable to store current position and move positoning …
nerdyman Jun 6, 2025
a9e65a6
style: prefer inline type imports, don't require react in jsx scope
nerdyman Jun 6, 2025
95972e7
ci: bump action versions
nerdyman Jun 6, 2025
b4902c0
refactor: remove `overflow: hidden` from `ContainerItem` closes #167
nerdyman Jun 6, 2025
a0e6622
perf: use css variable for bounds position
nerdyman Jun 15, 2025
aa542eb
style: bump line width to 110
nerdyman Jun 15, 2025
6a94399
refactor(remove `isOffset` logic from internal position functions, no…
nerdyman Jun 15, 2025
699ee13
docs: add multiple sliders example
nerdyman Jun 15, 2025
024fc50
refactor: enable offset in pointer position setters
nerdyman Jun 15, 2025
f59b21f
refactor: update css var names and const key, use handle container fo…
nerdyman Jun 22, 2025
1cdf0cb
style(docs): run prettier on stories
nerdyman Jun 22, 2025
9b50deb
feat: allow any CSS unit for `boundsPadding`
nerdyman Jun 22, 2025
ad63a8a
build: replace eslint and prettier with biome 💅✨
nerdyman Sep 26, 2025
fce45e8
build: use latest node lts
nerdyman Sep 26, 2025
22ec039
build: add biome config
nerdyman Sep 26, 2025
69b57b5
dx: add zed config
nerdyman Sep 26, 2025
eca7d02
style: format and lint all files
nerdyman Sep 26, 2025
864bec8
chore: fix typo in comment
nerdyman Sep 26, 2025
cd188d0
refactor: update `ReactCompareSliderClipOption` imports
nerdyman Sep 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ charset = utf-8
end_of_line = lf
indent_size = 2
insert_final_newline = true
max_line_length = 90
max_line_length = 110
trim_trailing_whitespace = true

[*.{md,mdx}]
Expand Down
63 changes: 0 additions & 63 deletions .eslintrc

This file was deleted.

10 changes: 4 additions & 6 deletions .github/workflows/publish-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ jobs:

steps:
- name: 🛒 Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4

- name: ⚒️ Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: 📦 Install Dependencies
run: |
corepack enable
pnpm install --frozen-lockfile --filter react-compare-slider
run: npm run bootstrap

- name: 🔨 Build
run: pnpm run --filter react-compare-slider build
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/iron
lts/jod
12 changes: 0 additions & 12 deletions .prettierignore

This file was deleted.

16 changes: 0 additions & 16 deletions .prettierrc.js

This file was deleted.

6 changes: 1 addition & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode"
]
"recommendations": ["dbaeumer.vscode-eslint", "EditorConfig.EditorConfig", "esbenp.prettier-vscode"]
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.rulers": [100],
"editor.rulers": [110],
"editor.formatOnSave": true,
"search.exclude": {
"**/node_modules": true,
Expand Down
26 changes: 26 additions & 0 deletions .zed/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"wrap_guides": [110],
"languages": {
"JavaScript": {
"formatter": { "language_server": { "name": "biome" } },
"code_actions_on_format": {
"source.fixAll.biome": true,
"source.organizeImports.biome": true
}
},
"TypeScript": {
"formatter": { "language_server": { "name": "biome" } },
"code_actions_on_format": {
"source.fixAll.biome": true,
"source.organizeImports.biome": true
}
},
"TSX": {
"formatter": { "language_server": { "name": "biome" } },
"code_actions_on_format": {
"source.fixAll.biome": true,
"source.organizeImports.biome": true
}
}
}
}
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@
<a href="https://github.com/nerdyman/react-compare-slider/actions?query=workflow%3Abuild"><img alt="GitHub CI status" src="https://img.shields.io/github/actions/workflow/status/nerdyman/react-compare-slider/ci.yml" /></a>
<a href="https://codeclimate.com/github/nerdyman/react-compare-slider/code?q=lib"><img src="https://img.shields.io/codeclimate/coverage/nerdyman/react-compare-slider" alt="Coverage" /></a>
<a href="https://react-compare-slider.vercel.app"><img alt="Demos" src="https://raw.githubusercontent.com/storybookjs/brand/8d28584c89959d7075c237e9345955c895048977/badge/badge-storybook.svg" /></a>
<a href="https://pkg.pr.new/~/nerdyman/react-compare-slider">
<img alt="Open in pkg.pr.new" src="https://pkg.pr.new/badge/nerdyman/react-compare-slider?style=flat&color=000&logoSize=auto">
</a>

</div>

> [!IMPORTANT]
> [!IMPORTANT]
> This readme is for the [v4 release](https://github.com/nerdyman/react-compare-slider/releases) which is currently in beta (`react-compare-slider@beta`).
>
>
> See [Version 3](https://github.com/nerdyman/react-compare-slider/tree/v3.1.0) for the latest stable release (`react-compare-slider`).

---
Expand Down Expand Up @@ -72,7 +75,7 @@ export const Example = () => {

| Prop | Type | Required | Default | Description |
| ---- | ---- | :------: | ------- | ----------- |
| [`boundsPadding`](https://react-compare-slider.vercel.app/?path=/story/demos--bounds-padding) | `number` | | `0` | Padding to limit the slideable bounds in pixels on the X-axis (landscape) or Y-axis (portrait).
| [`boundsPadding`](https://react-compare-slider.vercel.app/?path=/story/demos--bounds-padding) | `string` | | `0%` | Padding to limit the slideable bounds in pixels on the X-axis (landscape) or Y-axis (portrait).
| [`browsingContext`](https://react-compare-slider.vercel.app/?path=/story/demos--browsing-context) | `globalThis` | | `globalThis` | Context to bind events to (useful for iframes).
| [`clip`](https://react-compare-slider.vercel.app/?path=/docs/docs-clip--docs) | `` both\|itemOne\|itemTwo `` | | `both` | Whether to clip `itemOne`, `itemTwo` or `both` items.
| [`changePositionOnHover`](https://react-compare-slider.vercel.app/?path=/story/demos--change-position-on-hover) | `boolean` | | `false` | Whether the slider should follow the pointer on hover.
Expand Down
Loading
Loading