functora-egui
shadcn/ui-inspired widget library for egui.
70+ beautifully styled, ready-to-use components with built-in light and dark theming. Drop-in replacements for native egui widgets plus higher-level components like dialogs, date pickers, sidebars, and editor-ready controls.
Quick start
functora-egui is available on crates.io:
[]
= "0.4.2"
// Set up the theme (e.g. in your eframe CreationContext)
setup_fonts;
let theme = light;
set_shadcn_theme;
// Use components
new.show;
ui.add;
ui.add;
ui.add;
Components
| Category | Widgets |
|---|---|
| Inputs | Button, Checkbox, ColorSwatch, Combobox, DatePicker, Input, InputOtp, InputPasteClear, NumberInput, Radio, RadioGroup, Select, Slider, Switch, Textarea, TextareaPasteClear, Toggle, ToggleGroup |
| Layout | Accordion, AspectRatio, Card, Collapsible, Flex, Footer, Navbar, Resizable, ScrollArea, Separator, StatusBar, Tabs, Toolbar |
| Overlay | AlertDialog, BlockingOverlay, Command, ContextMenu, Dialog, DropdownMenu, HoverCard, Menubar, NavigationMenu, Popover, Sheet, Tooltip |
| Feedback | Alert, Badge, Empty, Progress, Skeleton, Spinner, Toast |
| Data | AreaChart, Avatar, Breadcrumb, Calendar, Carousel, Item, Pagination, Sidebar, Table |
| Display | Typography, Label, Kbd, Hyperlink, Hypertext |
| Grouping | ButtonGroup, InputGroup, FieldGroup, FieldSet, FieldLegend, FieldDescription, PropertyGrid, PropertyRow |
| Media | CameraView, QrImage, QrScanner |
| Icons | 1600+ Lucide icons via LucideIcon |
Theming
Built-in light and dark themes:
let light = light;
let dark = dark;
set_shadcn_theme;
Responsive design
Mobile-first adaptive UI out of the box, mirroring the conventions of functora-css: below 800px the layout switches to a touch-optimized mobile scale, and content is capped at 1440px on wide screens.
use ;
let breakpoint = ui.breakpoint; // Breakpoint::Mobile below 800px
let spacing = ui.responsive_spacing;
// Spacing::mobile(): touch height 44, page padding 16
// Spacing::desktop(): touch height 32, page padding 32
if ui.on_mobile
Widgets pick this up automatically:
- Buttons, inputs, selects, and paste-clear controls use the touch height (44) and padding (14) on mobile. Date pickers, comboboxes, navigation menus, pagination, and tabs use the touch height (44) with their own widget-specific horizontal padding.
DialogandAlertDialogbecome bottom sheets on mobile, with top-rounded corners and page padding, and stay centered windows on desktop.Sheetclamps its size so the panel always stays inside the screen.Sidebarrenders a slide-in overlay drawer with a backdrop on mobile and an inline collapsible panel (or icon rail) on desktop. Pair it withSidebar::toggle_button(ui, &mut collapsed). Opt out of the drawer withSidebar::new().static_()to always keep the inline panel.Flex::row()wraps onto multiple lines below 800px, so toolbars and card grids stay on screen on phones and keep a single row on desktop:
row
.gap
.show;
Force a single line with Flex::row().no_wrap_on_mobile(); Flex::column()
never wraps.
Examples
The functora-egui-demo crate in this repository is a full interactive
showcase of every layout, component, widget, and feature, with light/dark
theming and responsive mobile behavior. Run it locally:
functora-egui is a library crate and does not install a desktop application. For the demo's Linux distribution options, see its README.
License
MIT