jade_ui 0.3.0
jade_ui: ^0.3.0 copied to clipboard
A token-driven Flutter component library with first-class light and dark themes, independent of Material and Cupertino.
Changelog #
0.3.0 #
- An MCP server ships in the package.
dart run jade_ui:mcpstarts a stdio MCP server withlist_components,get_component,searchandread_doctools that answer from the docs of the installed Jade UI version. The package now depends ondart_mcpandpath. Test:test/mcp_server_test.dart. - The app skill ships in the package.
skills/jade-ui-build-apps/holds the Agent Skill for building apps with Jade UI, formerlyuse-jade-uiin the repository only. Install it into an app withdart run skills@ get -p jade_ui --all. Test:test/agent_config_test.dart. Dropdownopens on a right click. The newDropdownTriggerMode.secondaryClickopens the menu on a secondary click, or on the context-menu key or Shift+F10 while the trigger has focus, so a dropdown can serve as a context menu. The menu anchors to the trigger. Test:test/dropdown_test.dart.- Keyboard support for components that lacked it.
ListBoxrows take focus and select with Enter or Space.Popovertakes focus when it opens, closes on Escape and returns focus to its trigger.Tooltipshows when its child gains focus and hides on blur or Escape, as its docs already said.AreaChart,BarChartandDonutChartstep through points and slices with the arrow keys, Home and End. Test:test/keyboard_test.dart. - New
StaggerandStaggerItem. A one-off entrance that plays on eachStaggerItemin turn,intervalapart, as a fade, a fade-up or a scale. One controller drives the group, so items can sit in any layout, including lazy lists. Items frommaxStaggeredonwards start together, items built after the entrance show without animating, and rebuilds don't replay it. It followsThemeData.motionand the platform's reduce-motion setting. Test:test/stagger_test.dart. - Dark mode keeps the theme's font. When
JadeApp.darkThemeis null, the dark theme now takes the typography oftheme, recolored for dark surfaces, so a font family set on the light theme no longer falls back to the platform font in dark mode. Test:test/jade_app_test.dart.
0.2.0 #
- Balanced underline tabs. The secondary
Tabsvariant insets each label by the space the eye reads above and below it, half the tab height minus the cap height, so the underline sits close to the text: 10px atsmand 11px atmd, from 8px atxsto 18px atxxxl. The pill variant keeps its padding. Test:test/tabs_padding_test.dart. - Per-tab navigation.
TabScaffold.tabNavigatorsgives each tab its own navigator, so a page pushed inside a tab keeps the tab bar and each tab keeps its own stack. Selecting the active tab again, orTabScaffoldController.popToRoot, pops it to its first route, and the system back button pops the active tab before the app. Test:test/tab_scaffold_test.dart. - Router support.
JadeApp.routertakes arouterConfig(or arouterDelegateand friends), so go_router and other Router-based packages work with Jade's theme, localization and hero transitions. ReturnJadePageorFadePagefrom the router's page builders. Test:test/jade_app_test.dart. - Navigator helpers.
pushNamed,pushReplacementNamedandpushNamedAndRemoveUntiltakeargumentsand pass their result type through, andpushReplacementandpushReplacementNamedtake theresultfor the replaced route. Breaking:useRootNavigatoris nowrootNavigatoron every helper;pushNamedAndRemoveUntildropstitle,settings,maintainState,fullscreenDialogandallowSnapshotting, which it ignored (named routes come fromonGenerateRouteorpageRouteBuilder);pushReplacementandpushReplacementNamednow have a second type argument, so writepushReplacement<T, TO>when giving types explicitly. Test:test/navigator_utils_test.dart. - Charts.
AreaChart,BarChart,DonutChartandSparkline, drawn withCustomPainterfrom the theme's colours, withChartPoint,ChartSlice,ChartLegendandchartSeriesColorsbeside them. The axis charts show a tooltip on hover, tap or drag, take aformatcallback and acolorrole, and compare against the previous period withshowPrevious. Tests:test/area_chart_test.dart,test/bar_chart_test.dart,test/donut_chart_test.dart,test/sparkline_test.dart. - Sidebar items.
SidebarItemandSidebarGroupLabelgiveSidebarits own navigation rows: 36px rows with a 16px icon, a 14px label that truncates and a muted 12px trailing count, plus 12px group headings. In a compact sidebar the rows shrink to their icon with a tooltip and group labels hide. Breaking:Sidebar.widthdefaults to 240 (was 260) andcompactWidthto 56 (was 72). Test:test/sidebar_test.dart. - Fade route.
FadeRouteand itsPagecompanionFadePagecross-fade a page in over 300ms, for changes of app state such as splash to home or sign-out to welcome. No swipe-back, and the route underneath stays still. The fade followsMotionand is instant with reduced motion. Test:test/fade_route_test.dart. - Dialog sizes.
Dialog.sizetakes aDialogSizeagain:xs(300),sm(384),md(448),lg(512),coverandfull. Without one, dialogs arexson mobile andmdon wider screens. Breaking:Dialog.maxWidthis removed; readDialogSize.maxWidthinstead. Test:test/dialog_test.dart. - Soft checkbox and radio.
ControlVariant.softnow matches a soft chip: bordered likeoutlinewhen unselected, and filled with the role's soft tint and soft foreground when selected, with no shadow. Breaking:ControlDefaults.shadowsis removed, since no control draws a shadow now; drop the argument.ControlVariant.secondaryis renamedsolid, andCheckboxandRadionow default tosolidinstead ofoutline; passvariant: .outlineor setControlDefaults.variantto keep the old look. Test:test/selection_control_variant_test.dart. - No blur on the web.
ScrollShadow.blurandDialogBackdrop.blurdon't blur on the web: the scroll shadow keeps its gradient fades and the dialog barrier is dimmed only, likeopaque. - Templates. Seven complete apps now live in their own repository, jade_templates, each with a live demo: Pulse, Relay, Muse, Harbor, Tally, Loom and Haven. The website's Templates page links to them.
- Example.
example/is now a single profile screen instead of the Atrium booking app.
0.1.0 #
Initial release of Jade UI, a token-driven Flutter component library with first-class light and dark themes, independent of Material and Cupertino.
- One import. Everything public comes from
package:jade_ui/jade_ui.dart, which also re-exportspackage:flutter/widgets.dart. - App shell.
JadeAppsets up theming, navigation and localization.AppScopebrings Jade widgets into an app that already has its own shell. - Theming.
ThemeData.light()andThemeData.dark()with semantic color, typography, radius, border, shadow and breakpoint tokens, read throughcontext.colors,context.text,context.radii,context.shadowsandcontext.breakpoints. An accent color can be seeded from an image withImagePalette, andThemeData.defaultssets component sizes, variants, radii and shadows app-wide. - Buttons and actions.
Button,IconButton,CircleButton,ButtonGroup,ToggleButton,ToggleButtonGroup,CloseButton,LinkandKbd. - Forms and inputs. Text fields (
Input,TextArea,SearchField,NumberField,PromptInput,InputOtp,NumberPad), choice controls (Checkbox,CheckboxGroup,Radio,Switch,Slider,Rating,Select,Autocomplete), date and time pickers (Calendar,RangeCalendar,DateField,DatePicker,DateRangePicker,TimeField,TimePicker,TimeWheel,Dial), color pickers (ColorArea,ColorField,ColorPicker,ColorSlider,ColorSwatchPicker) and form validation withFormScope,Fieldset,Label,DescriptionandFieldError. - Data display.
Accordion,Avatar,AvatarGroup,Badge,Card,Carousel,Chip,EmptyState,FlipCard,AppImage,JadeText,ListBox,ListTile,Snippet,AppTable,TimelineandUser. - Layout and navigation.
Scaffold,AppBar,SliverAppBar,TabScaffold,DrawerLayout,Grid,Toolbar,BottomBar,Tabs,BottomTabBar,Breadcrumbs,Pagination,Navbar,Sidebar,Stepper, andJadePageRouteandJadePagefor page transitions. - Overlays and feedback.
showDialog,showBottomSheetandshowDrawer, plusPopover,Dropdown,Tooltip,ToastManager,Alert,ProgressBar,Spinner,TypingIndicator,SkeletonandLoadingScreen. - Icons. A small set of built-in icons for the components' own controls. Jade bundles no icon font, so pass your app's icons into widget slots.
- Accessibility and localization. Controls such as
Switch,Checkbox,Slider,Tabs,AccordionandSelectreport their role and state to screen readers, and alerts and toasts are live regions. Component strings come fromJadeLocalizations, which ships in English and can be overridden. - Docs for people and coding agents. A page per component, a
machine-readable API index,
llms.txtand a guide for coding agents that build apps with Jade UI. - Example app.
example/holds Atrium, a studio booking app built only from Jade UI components, in light and dark mode at phone and desktop widths.