panel-precision-slider
A versatile slider with fine-tuned control, adjustable precision, and direct text input for exact values.
Features
- Toggle Between Slider and Input: Switch between a slider and a direct input field for value selection.
- Adjustable Step Size: Show or hide the step size adjustment slider to control the precision of the value.
- Customizable Icons: Use toggle icons to enhance the user interface for swapping views and showing steps.
Installation
Install it via pip:
pip install panel-precision-slider
Development
This project is managed by pixi. You can install the package in development mode using:
git clone https://github.com/panel-extensions/panel-precision-slider
cd panel-precision-slider
pixi run pre-commit-install
pixi run postinstall
pixi run test
Usage
The PrecisionSlider is a custom Panel component that provides a synchronized slider and input field for selecting numerical values with adjustable precision. Users can toggle between a slider and a direct input field, as well as show or hide the step size adjustment.
Basic Example
import panel as pn
from panel_precision_slider import PrecisionSlider
pn.extension()
# Instantiate the PrecisionSlider
precision_slider = PrecisionSlider(
value=5,
min=0,
max=10,
step=0.1,
show_step=True,
swap=False
)
# Display the slider
precision_slider
Integrating with Other Panel Components
You can integrate PrecisionSlider with other Panel widgets and layouts to build interactive dashboards.
import panel as pn
import numpy as np
import holoviews as hv
from panel_precision_slider import PrecisionSlider
hv.extension('bokeh')
pn.extension()
def sine_wave(frequency):
x = np.linspace(0, 10, 500)
y = np.sin(2 * np.pi * frequency * x)
return hv.Curve((x, y), 'x', 'sin(2πfx)')
precision_slider = PrecisionSlider(name="Select Value", value=2.5, min=0, max=5, step=0.05)
sine_plot = pn.bind(sine_wave, precision_slider.param.value)
layout = pn.Column(
"### Precision Slider Example",
precision_slider,
sine_plot
)
layout.servable()
Contributing
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature. - Make your changes and commit them:
git commit -m 'Add some feature'. - Push to the branch:
git push origin feature/YourFeature. - Open a pull request.
Please ensure your code adheres to the project's coding standards and passes all tests.
Metadata
Release files for panel-precision-slider 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| panel_precision_slider-0.1.0.tar.gz | 116.1 kB | Without provenance | Details for panel_precision_slider-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| panel_precision_slider-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for panel_precision_slider-0.1.0-py3-none-any.whl |
Total release size: 121.5 kB
Release files / panel_precision_slider-0.1.0.tar.gz
| Download URL | panel_precision_slider-0.1.0.tar.gz |
|---|---|
| Size | 116.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26053c34808d538966f034005bb6e140f49b49786eccafccdb26b4eaabb2720e
|
|
BLAKE2b-256 checksum How to use checksums |
e805bbf4777baaba206a50152fcb767b2fbba0f10d3acfefc326a85b16868d2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / panel_precision_slider-0.1.0-py3-none-any.whl
| Download URL | panel_precision_slider-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71ebbe488a9f782c831879dd77aab5211c8d0882f686ab5128c1c48dc521fd58
|
|
BLAKE2b-256 checksum How to use checksums |
fc9cc8aaca7dc9e49f9beb55d7cf8bef11fdca3736c4982dd39ecd9c72f02725
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for panel-precision-slider 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.