Skip to main content

Add your description here

Project description

Pulse Mantine (Python)

Python bindings for Mantine UI components. Provides typed component wrappers for use in Pulse applications.

Architecture

Auto-generated Python wrappers around Mantine React components. Components are lazy-loaded and rendered to VDOM, which syncs to the JS client.

Python Component Call → VDOM Node → WebSocket → React Mantine Component

Folder Structure

src/pulse_mantine/
├── __init__.py           # Auto-generated exports (lazy loading)
├── version.py            # Package version
│
├── core/                 # Core Mantine components
│   ├── base.py           # MantineComponentProps base
│   ├── box.py            # Box, Mod
│   ├── provider.py       # MantineProvider, theme context
│   ├── theme.py          # MantineTheme, colors, spacing
│   ├── styles.py         # CSSVariables, StyleProp
│   ├── types.py          # MantineSize, MantineColor, etc.
│   │
│   ├── buttons/          # Button, ActionIcon, CloseButton, etc.
│   ├── inputs/           # TextInput, Checkbox, Select, Slider, etc.
│   ├── combobox/         # Autocomplete, MultiSelect, TagsInput, etc.
│   ├── layout/           # AppShell, Container, Flex, Grid, Stack, etc.
│   ├── data_display/     # Accordion, Avatar, Badge, Card, Image, etc.
│   ├── overlays/         # Modal, Drawer, Menu, Popover, Tooltip, etc.
│   ├── navigation/       # Anchor, Breadcrumbs, Pagination, Tabs, etc.
│   ├── feedback/         # Alert, Loader, Progress, Notifications, etc.
│   ├── typography/       # Text, Title, Code, List, Table, etc.
│   └── misc/             # Divider, Paper, ScrollArea, Collapse, etc.
│
├── charts/               # Mantine Charts (Recharts-based)
│   ├── area_chart.py     # AreaChart
│   ├── bar_chart.py      # BarChart
│   ├── line_chart.py     # LineChart
│   ├── pie_chart.py      # PieChart, DonutChart
│   ├── radar_chart.py    # RadarChart
│   ├── scatter_chart.py  # ScatterChart
│   ├── sparkline.py      # Sparkline
│   ├── heatmap.py        # Heatmap
│   └── ...
│
├── dates/                # Date/time components
│   ├── calendar.py       # Calendar
│   ├── date_picker.py    # DatePicker, DatePickerInput
│   ├── date_time_picker.py
│   ├── time_input.py     # TimeInput
│   ├── time_picker.py    # TimePicker
│   └── ...
│
└── form/                 # Form state management
    ├── form.py           # MantineForm - client-side form state
    ├── validators.py     # Built-in validators
    └── internal.py       # Form internals

Key Concepts

Components

All Mantine components are available as Python functions:

from pulse_mantine import Button, TextInput, Stack

def my_form():
    return Stack([
        TextInput(label="Name", placeholder="Enter name"),
        Button("Submit", color="blue"),
    ])

MantineProvider

Required wrapper for theming:

from pulse_mantine import MantineProvider

def layout(children):
    return MantineProvider(
        theme={"primaryColor": "blue"},
        children=children,
    )

Forms

Client-side form state with validation:

from pulse_mantine import MantineForm, TextInput, IsEmail, IsNotEmpty

form = MantineForm(
    initial_values={"email": "", "name": ""},
    validation={
        "email": IsEmail(),
        "name": IsNotEmpty(),
    },
)

def contact_form():
    return form(
        TextInput(label="Email", **form.field("email")),
        TextInput(label="Name", **form.field("name")),
        Button("Submit", type="submit"),
    )

Charts

Mantine Charts built on Recharts:

from pulse_mantine import LineChart

data = [
    {"date": "Jan", "value": 100},
    {"date": "Feb", "value": 200},
]

def chart():
    return LineChart(data=data, dataKey="date", series=[{"name": "value"}])

Validators

Built-in validators for forms:

  • IsEmail(), IsNotEmpty(), IsNumber(), IsInteger()
  • HasLength(min, max), Matches(regex)
  • IsInRange(min, max), IsDate(), IsBefore(), IsAfter()
  • IsUrl(), IsUUID(), IsULID(), IsJSONString()
  • StartsWith(), EndsWith(), MatchesField(field)
  • MinItems(), MaxItems(), AllowedFileTypes(), MaxFileSize()
  • RequiredWhen(), RequiredUnless()

Main Exports

Layout: AppShell, Container, Flex, Grid, Stack, Group, Center

Inputs: TextInput, Textarea, NumberInput, Select, MultiSelect, Checkbox, Switch, Slider, DatePicker, ColorInput

Buttons: Button, ActionIcon, CloseButton

Display: Card, Badge, Avatar, Image, Table, Accordion, Timeline

Overlays: Modal, Drawer, Menu, Popover, Tooltip, HoverCard

Feedback: Alert, Loader, Progress, Notification, Skeleton

Navigation: Tabs, Breadcrumbs, Pagination, NavLink, Stepper

Charts: LineChart, BarChart, AreaChart, PieChart, RadarChart

Form: MantineForm + validators

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

pulse_mantine-0.1.25.tar.gz (44.0 kB view details)

Uploaded Source

Built Distribution

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

pulse_mantine-0.1.25-py3-none-any.whl (99.2 kB view details)

Uploaded Python 3

File details

Details for the file pulse_mantine-0.1.25.tar.gz.

File metadata

  • Download URL: pulse_mantine-0.1.25.tar.gz
  • Upload date:
  • Size: 44.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pulse_mantine-0.1.25.tar.gz
Algorithm Hash digest
SHA256 b9ebad9e403d3b01336197fbc14845fc4a80a573a6ab056bcf26d03ed2e4dfc7
MD5 6b5269aa9b6c8b1e33cf7bc8ca2b6d6b
BLAKE2b-256 90ab47ddea7975264fb807a13b455bf881db0dfabc9cb3688b3412a44cd6dcbd

See more details on using hashes here.

File details

Details for the file pulse_mantine-0.1.25-py3-none-any.whl.

File metadata

  • Download URL: pulse_mantine-0.1.25-py3-none-any.whl
  • Upload date:
  • Size: 99.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pulse_mantine-0.1.25-py3-none-any.whl
Algorithm Hash digest
SHA256 0cd423fb14bc71719b8065ee35f6a812d7bc7c312f6a2f591f86e1cd3350f201
MD5 403698e9cacaa5c8a7395e28538f8a02
BLAKE2b-256 7aed4a630bdeb83c90ed6fb414ba51f3c37830089b30f39b1b91d580f6845a0c

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