Skip to main content

Hero UI - Modern UI components for Reflex Web Framework

Project description

HeroUI Provider

Modern UI components for the Reflex Python Web Framework.

I will update the classNames props later.

Features

  • Modern UI components with a clean, consistent design
  • Built specifically for Reflex web applications
  • Customizable themes and styling
  • TypeScript and Python type hints
  • Framer Motion animations
  • Tailwind CSS integration

Installation

uv pip install heroui-provider

Quick Start

import reflex as rx
import heroui as hero

# Create a state
class State(rx.State):
    count: int = 0
    
    def increment(self):
        self.count += 1
        
    def decrement(self):
        self.count -= 1

# Build your UI
def index():
    return rx.container(
        hero.provider(
            rx.vstack(
                hero.avatar(
                    name="John Doe",
                    size="lg",
                    src="https://api.dicebear.com/9.x/glass/svg?seed=Kingston",
                ),
                rx.flex(
                    hero.button(
                        "Increment",
                        on_press=State.increment,
                        color="success"
                    ),
                    rx.text(State.count),
                    hero.button(
                        "Decrement",
                        on_press=State.decrement,
                        color="danger"
                    ),
                    align="center",
                    margin="auto",
                    gap="1rem",
                ),
            ),
        )
    )

# Create and run the app
app = rx.App()
app.add_page(index)

Configuration

The HeroUI Provider comes with Tailwind configuration. In your rxconfig.py file:

import reflex as rx

tailwindplugin: dict = {
    "name": "@heroui/theme",
    "import": {"name": "heroui", "from": "@heroui/theme"},
    "call": "heroui",
}

HeroUILinker: str = "./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}"

config = rx.Config(
    app_name="my_app",
    tailwind={
        "theme": {"extend": {}},
        "content": [HeroUILinker],
        "darkMode": "class",
        "plugins": [
            "@tailwindcss/typography",
            tailwindplugin,
        ],
    },
)

Components

  • provider: Main HeroUI provider component
  • avatar: Profile image or initials display
  • button: Clickable actions
  • card: Content container with various states
  • checkbox: Selection input
  • input: Text input field
  • radio: Radio button selection
  • textarea: Multiline text input
  • alert: Notification and message display
  • More components available!

Check the documentation for complete component details.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

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

heroui_provider-0.1.4.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

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

heroui_provider-0.1.4-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file heroui_provider-0.1.4.tar.gz.

File metadata

  • Download URL: heroui_provider-0.1.4.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for heroui_provider-0.1.4.tar.gz
Algorithm Hash digest
SHA256 05e877ce7347e27c6df6f11a425e47372cd12d39b5bcda5f6bfa35f2ecd591d1
MD5 353ea30e4a00d9d0c7e6a7268cf0b007
BLAKE2b-256 d9435653ea9f3f3e7884822513262b005a16adf6a307202de5d747113832d189

See more details on using hashes here.

Provenance

The following attestation bundles were made for heroui_provider-0.1.4.tar.gz:

Publisher: publish.yml on itsmeadarsh2008/heroui-provider

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file heroui_provider-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for heroui_provider-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3769185add031bb858bf850508606a18008c14886ba6cae94d76da2c282fd4a5
MD5 d4ce9b6c41c31029119fca26069ebba1
BLAKE2b-256 3cc08afd0a7e874de1aace5396a932d9a1b7c762f2129e732aeca922fa80d292

See more details on using hashes here.

Provenance

The following attestation bundles were made for heroui_provider-0.1.4-py3-none-any.whl:

Publisher: publish.yml on itsmeadarsh2008/heroui-provider

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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