github reflex-dev/reflex v0.4.0

latest releases: v0.8.12, v0.8.11, v0.8.10...
19 months ago

See our blog post for more details on this release: https://reflex.dev/blog/2024-02-16-reflex-v0.4.0

Known Issues

Hot reload on windows does not seem to work (Under investigation)

Breaking Changes

Top-level Namespace is now Radix Components

See the latest Reflex documentation for complete information about the new components API.

Run reflex script keep-chakra to retain compatibility with 0.3.x apps.

This script will automatically update your app code to reference previous top-level namespace via rx.chakra.<x>

Some components are no longer available in the core library and must now be accessed via rx.chakra such as:

  • circular_progress
  • stat and stat_group
  • list (Use rx.unordered_list(list_style_type="none") instead)
  • pin_input
  • circle
  • button_group

Component Prop Changes

  • rx.progress no longer supports is_indeterminate
  • rx.slider: value is expected to be a list of numbers, one for each slider thumb. on_change will be called with a list of numbers, one for each slider thumb.
  • rx.vstack and rx.hstack no longer center content by default.
  • rx.icon uses Lucide tags (rx.chakra.icon for the previous tags)
  • spacing and size props accept radix scale, generally string integers, from "0" to "9".
    • To apply CSS units, use CSS props like gap, height, width, padding, etc.
  • type_, max_, and min_ props should be specified without the trailing underscore.

Radix Themes

Apply themes to the root rx.App component via the theme=rx.theme(...) prop. This will apply the theme to all radix components.

New Features

Upload Workflow Refactor

  • Set upload dir via environment variable REFLEX_UPLOADED_FILES_DIR, which defaults to ./uploaded_files.
  • Use rx.get_upload_dir() to access the upload directory from the backend.
  • Use rx.get_upload_url(filename) to get a link to the uploaded file in the frontend.

rx.download now accepts str or bytes for data argument

Allow users to download data directly from the backend without writing to an intermediate file.

All Changes

New Contributors

Full Changelog: v0.3.9...v0.4.0

Don't miss a new reflex release

NewReleases is sending notifications on new releases.