Crate: lumen-dioxus · Dioxus: 0.7 · Rust: 1.88 or later
lumen-dioxus brings every Lumen component to
Dioxus. The components render the same classes, attributes, and ARIA as
@santi020k/lumen-react and share Lumen's stylesheet, so an app looks the same in a browser, in a
desktop or mobile webview, and in Dioxus Native, which draws HTML and CSS with the
Blitz engine instead of a webview. Interactions run in Rust,
so they also work where there is no JavaScript.
On this page: Install · Quick start · Renderers · Theming · Icons · Components · Behavior and accessibility · Dioxus Native support · Versioning · Development
Install
or in Cargo.toml:
[]
= { = "0.7", = ["web"] }
= "6.0"
Pick the renderer in your app's own dioxus dependency: web, desktop, mobile, or native.
lumen-dioxus only depends on Dioxus's component, HTML, signal, hook, and document APIs, so it
works with any of them. Optional features:
| Feature | Default | What it adds |
|---|---|---|
icon-names |
Yes | Runtime icon names (Icon { name: "trash" }); links the full Lucide catalog |
brand-icons |
No | Font Awesome Free brand icons, as icons::brand constants and brand:<name> names |
Quick start
Render LumenStyles once near the root, wrap the app in LumenTheme, and use the components from
the prelude:
use *;
use *;
LumenStyles embeds the complete stylesheet, including the default fonts, in a <style> element.
If you load styles another way, lumen_dioxus::LUMEN_CSS holds the same CSS as a string.
Every component also accepts class (appended after the Lumen classes) and any attribute its root
HTML element accepts, such as id, aria_label, or r#for. Props follow the React adapter in
snake case: default_value, on_value_change, and so on.
Renderers
| Renderer | Your dioxus features |
Run | Notes |
|---|---|---|---|
| Web | ["web"] |
dx serve --platform web |
Full support |
| Desktop | ["desktop"] |
dx serve --platform desktop |
System webview; full support |
| Mobile | ["mobile"] |
dx serve --platform ios or android |
System webview; full support |
| Dioxus Native | ["native"] |
dx serve --platform native or cargo run |
Blitz engine; see Dioxus Native support |
| Server rendering | dioxus-ssr |
dioxus_ssr::render_element(...) |
Static HTML, for sites and emails |
The crate ships runnable examples that share one gallery page with every component:
For a smaller Native preview of localized numbers and nested chart themes, run from
packages/dioxus with build output outside the checkout:
CARGO_TARGET_DIR=/tmp/lumen-dioxus-target
Theming
LumenTheme sets the color scheme and appearance preset for its children, using the same
data-theme, data-lumen-scheme, and data-lumen-preset attributes as every Lumen adapter, and
paints the canvas background, text color, and font. Nest it to theme one section differently.
let mut scheme = use_signal;
rsx!
Presets: Default, Classic (the Lumen 5 look), Paper, Luminous, Voltage, Signal,
Studio (dense and quiet, for pro tools), and Aura (a violet-to-blue gradient on filled brand
surfaces, brand-tinted glow elevation, and Geist type, for AI products and developer tools). Glass
surfaces are opt-in per component with glass.
Aura's gradient is a plain linear-gradient layered over the solid brand color, so Dioxus Native
draws it too. A renderer that can't draw the gradient shows that solid color instead.
Lumen 6 retires the Field, Clay, and KinJar presets, and LumenPreset::Studio replaces the
color-only Lumen 5 Studio preset. To recreate a retired preset, generate CSS with
@santi020k/lumen-core in a build step:
exportLumenPaletteCss('clay', createLumenPalette(lumenPaletteStarters.clay.seeds)). The starters
are starting points based on the retired themes. Load the CSS after LumenStyles and set
"data-lumen-palette": "clay" on LumenTheme. For KinJar, pair the kinjar palette with
LumenPreset::Luminous. For a look closer to the Lumen 5 Studio preset, pair the studio palette
with LumenPreset::Default.
On Dioxus Native or another CSS engine without @scope, repeat data-lumen-palette on each nested
scheme or preset boundary; the direct palette rule works without scoped CSS support.
Icons
The complete Lucide catalog is available as constants in
lumen_dioxus::icons::lucide. Pass a constant so only the icons you use reach the binary, or
resolve a name at runtime:
rsx!
Unnamed icons are decorative and hidden from assistive technology. With the brand-icons feature,
Icon { name: "brand:github" } resolves Font Awesome Free brand icons.
Runtime names come from the default icon-names feature, which links the whole catalog (about
360 KB) into any binary that renders an Icon. Apps that only pass constants, for example to keep
a web bundle small, can drop it:
= { = "6.0", = false }
Number localization
FormattedNumber, ImageComparison value text, and MediaViewport zoom text honor BCP 47
locale values on every renderer, including Native. Examples include es-CO for Colombian
currency and ar-EG-u-nu-latn for an Arabic locale with Latin digits. Numbers retain their
machine-readable value while grouping, digits, currency placement, units, compact text, and
screen-reader long readings use the requested locale.
Omitted, malformed, oversized, and unsupported language tags fall back to en; supported
regional tags use ICU's locale fallback. Invalid numeric input or unavailable formatting data
uses the component's fallback instead of mislabeling English text as localized output.
currency_name: Never retains the visible reading, Always names the currency, and Auto
checks the symbol actually shown in that locale. FormattedDate's optional built-in date/time
formatting remains English/UTC; applications can supply localized date text as children.
The implementation uses pure-Rust ICU4X 2.4 with Rust 1.88 unchanged.
Currency and compact APIs are experimental and pinned exactly (icu_experimental = 0.7.0);
their types are private to Lumen. Upgrade those packages together and review the independent
Intl reference fixtures before release. ICU supplies compiled locale data; generated Unicode
CLDR unit patterns supplement unit categories not covered by ICU4X's formatter yet. Those
patterns cover 657 locale records, deduplicated to 187 tables (about 1.8 MB of Rust source).
This source size is not a measured binary or application bundle increase.
Regenerate with node scripts/generate-dioxus-unit-locales.mjs and
node scripts/generate-dioxus-number-locales-fixtures.mjs from the repository root. Both accept
--check to compare without writing. The unit generator downloads the SHA-512-pinned CLDR 49
archive and therefore needs network access even with --check. Both generators require
exactly Node 24.21.0 with ICU 78.3 and reject other generator runtimes before reading,
fetching, or writing data, including in --check mode; the application's supported runtimes are
unchanged. Neither requires installing a JavaScript package.
Redistributed locale data is covered by LOCALE_NOTICES.md.
Components
lumen-dioxus covers every component in the Lumen catalog. Each group links to its reference, with
props, a compiled example, and renderer notes. The same examples appear as the Dioxus tab on
every component page of the documentation site.
BarChart and LineChart default to matching 640 × 240 plots. Both accept width and height;
RangeChart and ComboChart accept the same dimensions with 640 × 320 defaults. These coordinate
frames scale responsively; pass width: 480.0 to retain the earlier bar-chart proportions.
Value gutters account for compact 22px labels and custom formatter callbacks. Line and combo
series support .with_dash(ChartSeriesDash::Dashed) (Solid and Dotted are also available);
leave dash unset to retain automatic series patterns. Direct ChartSeries literals need the
new dash: None field. Dash patterns require a CSS-capable renderer; Native Line/Combo styling
retains the SVG limitations documented below.
Charts (18): Chart, Sparkline, BarChart, LineChart, PieChart, ScatterChart, Heatmap, RangeChart, ComboChart, CalendarHeatmap, FunnelChart, BoxPlot, BulletChart, LollipopChart, DumbbellChart, Histogram, WaterfallChart, ChartMotion
Content (32): Agenda, Attachment, AttachmentList, AttachmentPreview, Bubble, Code, CodeTabs, CoverImage, DeviceFrame, Eyebrow, FloatingBadge, FormattedDate, FormattedNumber, Image, ImageComparison, InstallCommand, Item, Kbd, Marker, MediaFilmstrip, MediaThumbnail, MediaViewport, Message, Note, Pill, QRCode, Schedule, SecretValue, Terminal, Testimonial, TestimonialGroup, Typography
Data components (33): Stat, StatLabel, StatValue, StatDescription, StatIcon, StatTrend, StatGroup, Meter, Rating, Timeline, Timer, Descriptions, DescriptionItem, DescriptionTerm, DescriptionDetail, Table, DataTable, Tree, TreeGrid, VirtualList, ReorderableList, ChangeSummary, FilterBar, ThemeBuilder, WorldMap, ApprovalCard, PromptComposer, SourceCitation, StreamMessage, ToolActivity, Reasoning, MessageActions, PromptSuggestions
Foundation components (23): Button, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Badge, Alert, Progress, Spinner, Avatar, Separator, Label, Input, Textarea, Field, FieldError, Checkbox, Switch, Tabs, Icon, LumenTheme
Inputs (24): AmountField, Autocomplete, CharacterCount, CheckboxCard, CheckboxGroup, Combobox, ErrorSummary, Form, InlineEdit, InputGroup, InputOTP, ListBox, Mentions, NativeSelect, NumberField, PasswordField, RadioCard, RadioGroup, SearchField, Segmented, Select, SettingsRow, Slider, TagGroup
Layout components (24): Accordion, AspectRatio, Collapsible, Container, Direction, FeatureGrid, Hero, PageHeader, Prose, SectionHeader, Stack, Grid, Steps, Toolbar, VisuallyHidden, Watermark, Affix, ScrollArea, Resizable, GradientDivider, Carousel, KanbanBoard, KanbanColumn, MessageScroller
Motion components (16): Particles, ScrollReveal, RevealGroup, VisualEffect, Marquee, Parallax, ViewProgress, MotionGroup, TextRoll, SplitText, AnimatedNumber, Backdrop, Graphic, AnimatedLogo, AnimatedPortrait, Illustration
Navigation (31): AppHeader, BackToTop, Breadcrumb, ButtonGroup, ButtonLink, Command, ContextNavigation, CopyButton, HeadingAnchor, LanguageToggle, Link, LoadMore, Menubar, NavigationMenu, PageNav, Pagination, SelectionBar, ShareLinks, Sidebar, SidebarItem, SidebarTrigger, SiteFooter, SiteHeader, SkipLink, SpeedDial, Stepper, Anchor, SwipeCard, ThemeToggle, Toggle, ToggleGroup
Overlay components (28): Callout, Empty, ErrorState, StatusDot, Skeleton, RouteProgress, ScrollProgress, Toast, ToastViewport, Dialog, DialogHeader, DialogTitle, DialogBody, DialogFooter, DialogClose, DialogForm, AlertDialog, Sheet, Drawer, SearchDialog, SearchDialogTrigger, DropdownMenu, ContextMenu, Popover, HoverCard, Tooltip, Popconfirm, Tour
Pickers and structured editors (11): Calendar, ColorPicker, DatePicker, DateRangePicker, TimeField, FileUpload, Transfer, Cascader, TreeSelect, PhoneInput, RichTextEditor
Behavior and accessibility
- Controlled or uncontrolled. Stateful components accept a controlled value (
value,checked,open) or a default (default_value,default_checked,default_open) and report changes throughon_value_change-style handlers, like the React adapter. - Keyboard. Tabs, menus, listboxes, grids, sliders, and trees follow the WAI-ARIA patterns: arrow keys, Home and End, typeahead where Lumen web has it, and Escape to dismiss. Keyboard paths run in Rust on every renderer.
- Focus. On web, desktop, and mobile, roving focus moves DOM focus and dialogs and menus move focus in and back to their trigger. Dioxus Native does not report mounted elements yet, so there the roving tab stop updates but DOM focus stays where the user put it.
- Ids. Components that link labels, descriptions, and panels generate stable ids with
hooks::use_unique_id; pass your ownidto control them. Generated ids come from a process-wide counter, so server rendering supports static HTML but not hydrating that HTML in the browser (Dioxus fullstack); pass explicit ids where a page must hydrate. - Forms. Custom controls render hidden inputs for their
nameandvalue, so native form submission keeps working. - Floating panels. Popovers, menus, selects, and tooltips render in the component tree with
Lumen's absolute-positioning fallback. While a panel is open, a transparent
DismissLayercloses it on an outside click.
Building your own components? lumen_dioxus::hooks (use_unique_id, use_controllable),
lumen_dioxus::overlay (DismissLayer, is_escape, focus_element), and
lumen_dioxus::time::sleep are public.
Dioxus Native support
Dioxus Native renders Lumen's HTML and CSS with Blitz, without a webview. Every component renders, and clicks, keys, and text input drive the same Rust state as on the web. Blitz 0.2, which ships with Dioxus Native 0.7, has these limits:
- Events and focus. Blitz reports click, mouse, keyboard, and input events only: no pointer,
hover, focus/blur, scroll, wheel, resize, double-click, submit, or mounted events. Hover cards
can toggle on click; tooltips require a controlled
openprop. Programmatic focus and focus restoration remain unavailable without mounted element handles. Drags (Resizable, Kanban, WorldMap, SwipeCard) use mouse events with approximate sizes, because elements cannot be measured; scroll-linked components (ScrollProgress, BackToTop, Anchor, Parallax, ViewProgress, MessageScroller, and VirtualList windowing) take controlled values or settle in a static state. - SVG. Blitz draws inline SVG as an image, so Lumen's CSS does not reach it.
BarChart,PieChart, andSparklineemit generated literal SVG paint attributes when the existing capability probe detects Native, with explicit SVG dimensions and fallback sizing for Bar. Pie keeps its canonical responsive CSS sizing. Their colors follow the nearestLumenTheme, including scheme/preset changes and nested themes; without a provider they use Default/light. The generated paints do not read custom CSS palettes, responsive rules, or animation effects. Other SVG charts and generic icons still lack inherited paint colors, and SVG marks cannot be clicked. Chart legends, data tables, and the HTML-based charts (FunnelChart, BoxPlot, BulletChart, LollipopChart, DumbbellChart) work fully. - Check controls. Checkbox, Switch, and the controls built on them render as
<button role="checkbox">and<button role="switch">witharia-checkedon every renderer, because Blitz ignoresappearance: noneon native inputs. A named, checked control renders a hidden input so forms still submit its value. - Web platform APIs. The clipboard, scroll observers,
contenteditable, filling another element (the PromptSuggestionstarget), JavaScript regular expressions (the InlineEditpattern), document keyboard shortcuts (the SearchDialog Ctrl+K and Command+K), and Rive animations have no Native equivalent. Components that need them usedioxus::document::evalon web, desktop, and mobile, and fall back to a documented state on Native: for example, CopyButton calls youron_copyhandler instead, PromptSuggestions leaves the composer to youron_suggestion_selecthandler, InlineEdit leavespatternunchecked, and SearchDialog opens only from its trigger. - Native widgets. Blitz has no
<select>popup, soNativeSelectdoes not open there; useSelect. Color and time inputs fall back to text fields, and FileUpload needs Blitz's file input support and has no drag and drop. - Dismissal. Blitz lays out
position: fixedlikeabsolute, so aDismissLayercovers only the nearest positioned ancestor and some outside clicks may not close a panel. Use the panel's close controls and documented keyboard paths; focus trapping, focus restoration, document-wide listeners, and top-layer positioning still depend on upstream renderer support. - Rendering. Placeholders do not show, text truncation clips without an ellipsis, glass
(
glass) needsbackdrop-filter, which Blitz draws only with its Skia renderer, and tab list borders, checkbox marks, and switch thumbs need the newer Blitz on the Dioxus 0.8 line. - Brand gradients. Aura's gradient is a plain three-stop
linear-gradient, and its glow elevation is made of box shadows; Blitz draws both. A renderer that can't draw the gradient shows the solid brand color underneath.
Each component's reference lists its renderer notes.
Versioning
lumen-dioxus shares the Lumen major with every published Lumen package and follows semantic
versioning within it (shared major versions).
6.x targets Dioxus 0.7 and Lumen 6 styles; a move to a new Dioxus line waits for the next Lumen
major. The minimum supported Rust version is 1.88. See the changelog.
Development
From the repository root:
From packages/dioxus:
Inside the Lumen repository, point CARGO_TARGET_DIR outside the checkout (or run cargo clean
before committing): the repository's lint hook stops at its directory scan limit when
packages/dioxus/target grows large.
assets/lumen.css and the icon modules are generated; edit the canonical sources instead. The
parity tests in tests/parity_*.rs render each component with Dioxus SSR and compare it with the
lumen-react fixture, so both adapters keep producing the markup Lumen's CSS expects. Releases
follow the release runbook.
License
MIT. The bundled fonts use the SIL Open Font License (FONT_NOTICES.md) and the icons use the ISC and CC BY 4.0 licenses (THIRD_PARTY_NOTICES.md).
Made by Santiago Molina.