Skip to main content

Reflex custom component img-comparison-slider

Project description

img-comparison-slider

A Reflex custom component img-comparison-slider.

Installation

pip install reflex-img-comparison-slider

Usage

import reflex as rx
from reflex_img_comparison_slider import img_comparison_slider


def index() -> rx.Component:
    return rx.center(
        rx.vstack(
            rx.heading("Image Comparison Slider", size="7"),
            img_comparison_slider(
                rx.image(src="/green-leaves.webp", slot="first"),
                rx.image(src="/green-leaves-blurred.webp", slot="second"),
            ),
            align="center",
            spacing="7",
        ),
        height="100vh",
    )

Slider Props

Name Key Values Description
Position value int Position of the divider in percents. Must be between 0 and 100. (default: 50)
Hover hover bool Automatically slide on mouse over. (default: False)
Direction direction "vertical", "horizontal" Direction of the slider. (default: "horizontal")
Keyboard keyboard "enabled", "disabled Enable/disable slider position control with the keyboard. (default: enabled)
Handle handle bool Enable/disable dragging by handle only. (default: False)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reflex_img_comparison_slider-0.0.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reflex_img_comparison_slider-0.0.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file reflex_img_comparison_slider-0.0.1.tar.gz.

File metadata

File hashes

Hashes for reflex_img_comparison_slider-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d1715ee4e2938b5d431b81c37ce0dee72e42afff0793c8cfcc7c4f205f883159
MD5 d4695ce9b7204531ae076dab719aad43
BLAKE2b-256 4173a62ca5eec785c76d33ebe7a9bba33b2a3830e1d2b8165dc2aba7646ec5a8

See more details on using hashes here.

File details

Details for the file reflex_img_comparison_slider-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for reflex_img_comparison_slider-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0938cf9b8f742592455ad2bb0a0a59a4cc0013241ce69316b048f6acc823bfb5
MD5 a58e744dcad4206f69788f80d62090a4
BLAKE2b-256 4708a893450ea783f9738044743a7e9587a194e0b6fe94bd54ab77ebe5a59b93

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page