tinyrack_ui library

Tinyrack themes, tokens, and Flutter widgets.

Classes

TinyrackIllustrationThemeData
Semantic colors for theme-aware vector and isometric illustrations.
TinyrackTheme
Creates complete Material 3 themes backed by Tinyrack tokens.
TinyrackThemeData
Semantic colors available through the active ThemeData.
TRAccordion
A bordered stack of disclosure items with coordinated open state.
TRAccordionItem
A single disclosure item within TRAccordion.
TRAdaptiveLayoutScope
Exposes the width class resolved from the complete adaptive viewport.
TRAdaptiveListDetailLayout
Places collection and detail panes side by side on large viewports.
TRAdaptiveNavigationLayout
Places application navigation beside content when the viewport permits it.
TRAdaptivePane
Marker and semantic boundary for one adaptive pane.
TRAlert
A persistent semantic status message.
TRAlertDialog
A decision dialog whose backdrop cannot dismiss the pending choice.
TRAnimatedNumber
Displays a locale-formatted number and animates changes to its value.
TRAppShell
Responsive application chrome composed from typed Tinyrack shell parts.
TRAppShellActions
Trailing actions for TRAppShellHeader.
TRAppShellBrand
Inline brand content for TRAppShellHeader.
TRAppShellClose
Closes the modal mobile sidebar.
TRAppShellController
Owns mutable navigation state for an application shell.
TRAppShellHeader
Top chrome for TRAppShell.
TRAppShellMain
Main content surface for TRAppShell.
TRAppShellOutline
Optional docs outline shown with TRAppShellMain.
TRAppShellSidebar
Scrollable navigation surface for TRAppShell.
TRAppShellSidebarLabel
Sidebar label that remains available to semantics in rail mode.
TRAppShellSidebarToggle
Toggles expanded and rail sidebar modes on desktop.
TRAppShellTrigger
Opens the modal mobile sidebar. Hidden in desktop and mobile rail postures.
TRAutocomplete<T extends Object>
A free-text field with typed static or asynchronous suggestions.
TRAutocompleteController<T extends Object>
Owns the query, focus, and selected value of an autocomplete.
TRAutocompleteFormField<T extends Object>
Form-integrated TRAutocomplete.
TRAutocompleteItem<T extends Object>
A typed suggestion displayed by TRAutocomplete.
TRAvatar
A circular or square identity badge with an image or fallback initials.
TRBadge
A compact semantic status label.
TRBreadcrumbs
A trail of ancestor pages leading to the current page.
TRBreadcrumbsItem
A single entry rendered within TRBreadcrumbs.
TRBreakpoints
Viewport widths at which a responsive layout changes shape.
TRButton
A Tinyrack command or form action.
TRCard
A structured Tinyrack content surface.
TRCardContent
The main content region of a card.
TRCardDescription
Supporting card text using the canonical muted body-small typography.
TRCardFooter
A wrapping row for card actions.
TRCardHeader
Groups a card title and description with the canonical small gap.
TRCardTitle
A card heading using the canonical heading-small typography.
TRChatMessageRow
A start-aligned chat row with a shared leading icon rail.
TRChatStatusRow
A compact status entry in a chat transcript.
TRChatToolDisclosure
An expandable chat tool row with a compact action and status summary.
TRChatUserBubble
An end-aligned bubble for user-authored chat content.
TRCheckbox
A tri-state Tinyrack selection control.
TRCheckboxFormField
A Form participant backed by the controlled TRCheckbox contract.
TRCheckboxGroup
Coordinates the checked values of a set of TRCheckbox children.
TRCode
An inline monospace code chip.
TRCodeBlock
A multi-line, scrollable monospace code surface.
TRCodeHighlighterProvider
Supplies syntax highlighting to code blocks in a subtree.
TRCodeHighlightFailure
Details reported when a code block falls back to plain text.
TRCodeHighlightRequest
Input passed to a TRCodeHighlighter.
TRCodeHighlightResult
Highlighted code returned by a TRCodeHighlighter.
TRCollapsible
A single disclosure panel that expands to reveal its content.
TRCombobox<T extends Object>
A searchable, typed single-selection field.
TRComboboxController<T extends Object>
Owns a single combobox value and its query field.
TRComboboxFormField<T extends Object>
Form-integrated single combobox.
TRComboboxItem<T extends Object>
A typed option displayed by a Tinyrack combobox.
TRContextMenu
Opens menu items at a pointer or keyboard context-menu position.
TRContextMenuController
Opens a TRContextMenu from code.
TRContextMenuHost
The operations one presented context menu supports.
TRContextMenuPresenter
Presents the elements of a TRContextMenu.
TRContextMenuPresenterScope
Installs the TRContextMenuPresenter every enclosed TRContextMenu uses.
TRControlMetrics
Platform-resolved geometry of a Tinyrack control at each TRUiSize.
TRCopyButton
A TRButton that copies value to the clipboard and briefly confirms it.
TRDialog
A structured Tinyrack dialog surface for use with showTRDialog.
TRDrawer
A swipeable sheet surface for use in a route or TRDrawerScaffold.
TRDrawerController
Controls a TRDrawerScaffold.
TRDrawerScaffold
Places a non-route drawer over or beside application content.
TRDropOverlay
Covers a product-owned drop target while a supported drag is active.
TRField
Labels a control with an optional description or error message.
TRFieldset
A bordered group of related form controls.
TRFileTree
A file-system-specific tree navigation view.
TRFileTreeDirectory
Expandable directory in a TRFileTree.
TRFileTreeFile
Leaf file in a TRFileTree.
TRFileTreeNode
Base node in a TRFileTree.
TRFlutterContextMenuPresenter
Draws a context menu with Tinyrack components inside the app's overlay.
TRFocusRing
The Tinyrack focus indicator for a product-specific composite control.
TRForm
A Flutter Form that also exposes named values across Tinyrack fields.
TRFormState
State and submit lifecycle for TRForm.
TRFormValues
Immutable snapshot of named Tinyrack form values.
TRIconButton
An icon-only Tinyrack action with a required accessible label.
TRInlineSuggestionItem<T extends Object>
One row offered by TRInlineSuggestions.
TRInlineSuggestions<T extends Object>
Suggestions anchored to a trigger token inside a caller-owned text field.
TRInlineSuggestionsController<T extends Object>
Owns the open state and highlight of a TRInlineSuggestions list.
TRLayerHeight
Height policy for a caller-sized anchored layer.
TRLayerSize
Width and height policy for the complete bounds of an anchored layer.
TRLayerWidth
Width policy for a caller-sized anchored layer.
An inline, navigable Tinyrack text action.
TRMeasurements
Platform-resolved measurements used by Tinyrack surfaces and overlays.
TRMenu
A Material menu anchor with Tinyrack layer styling.
TRMenuActionElement
A command in a context menu.
TRMenubar
A horizontal group of menus with Material arrow-key coordination.
TRMenubarMenu
One top-level menu in a TRMenubar.
TRMenuCheckboxItem
A checkbox setting that stays inside the open menu by default.
TRMenuElement
One entry of a context menu, described as data rather than as widgets.
TRMenuGroupLabel
A muted heading for a related group of menu items.
TRMenuItem
A command in a TRMenu.
TRMenuRadioItem<T>
A radio setting that stays inside the open menu by default.
TRMenuSeparator
A visual separator between menu groups.
TRMenuSeparatorElement
A rule between two groups of commands.
TRMenuSubmenu
A cascading submenu inside a TRMenu.
TRMenuSubmenuElement
A nested menu opened from a parent entry.
TRMeter
A labeled measurement against a known range.
TRMotion
Shared animation durations and curves.
TRMultiCombobox<T extends Object>
A searchable multiple-selection field with removable chips.
TRMultiComboboxController<T extends Object>
Owns multiple combobox values and their shared query field.
TRMultiComboboxFormField<T extends Object>
Form-integrated multiple combobox.
TRNativeContextMenuPresenter
Asks the operating system to draw a TRContextMenu.
TRNavigationMenu<T>
A horizontal navigation list with collision-aware rich panels.
TRNavigationMenuController<T>
Coordinates the open panel of an uncontrolled TRNavigationMenu.
TRNavigationMenuItem<T>
A top-level destination and its rich navigation panel.
TRNavigationPane
Scrollable navigation content with standard pane insets and section rhythm.
TRNavigationRow
A standalone navigation destination with TreeNav interaction and geometry.
TRNavigationSection
A labelled group inside a TRNavigationPane.
TRNumberField
A locale-aware nullable number input with stepper and scrubbing behavior.
TRNumberFieldController
Owns the nullable numeric value of a TRNumberField.
TRNumberFieldFormField
Form-integrated TRNumberField.
TROpacity
Platform-resolved opacity values for product-owned effects.
TROtpField
A single accessible editing field rendered as a row of verification slots.
TROtpFieldController
Owns the text entered into a TROtpField.
TROtpFieldFormField
Form-integrated TROtpField.
TRPageTransitionsBuilder
The page transition every Tinyrack surface uses.
TRPagination
A numbered page navigator for statically divided content.
TRPaneHeader
Shared title, description, and action chrome for one application pane.
TRPopover
An interactive, collision-aware surface anchored to a trigger.
TRPopoverController
Controls an uncontrolled TRPopover.
TRPreviewCard
A delayed hover or focus preview that may contain interactive content.
TRPreviewCardController
Controls an uncontrolled TRPreviewCard.
TRProgress
A linear determinate or indeterminate progress indicator.
TRQrCode
Accessible, token-styled QR image for short-lived links and identifiers.
TRRadialMeter
A compact circular measurement against a known range.
TRRadii
Platform-resolved corner radii in logical pixels.
TRRadio
A single option within a TRRadioGroup.
TRRadioGroup
Coordinates the mutually exclusive selection of TRRadio children.
TRRangeSlider
A two-thumb slider with an optional minimum gap.
TRRangeSliderFormField
Form-integrated range slider.
TRScrollArea
A themed viewport with optional horizontal and vertical scrollbars.
TRSelect<T>
A Material-native, single-value select with controlled and uncontrolled APIs.
TRSelectController
Opens and closes a TRSelect independently of its presentation.
TRSelectFormField<T>
A Form participant backed by the controlled TRSelect contract.
TRSelectItem<T>
A typed option displayed by TRSelect.
TRSelectLayerPresentation
Geometry of the layer a TRSelect anchors to its trigger.
TRSelectPresentation
How a TRSelect presents its shared search and options panel.
TRSelectSheetPresentation
TRSeparator
A thin divider line between content regions.
TRShadows
Platform-resolved elevation shadows.
TRSkeleton
A placeholder surface shown while content is loading.
TRSlider
A scalar horizontal or vertical slider with controlled and uncontrolled APIs.
TRSliderFormField
Form-integrated scalar slider.
TRSpacing
Platform-resolved spacing values in logical pixels.
TRSpinner
A progress indicator sized for Tinyrack controls.
TRSplitView
A controlled two-pane layout with an accessible resizable separator.
TRStepsItem
A single stage rendered within TRStepsRoot.
TRStepsRoot
A numbered sequence of stages, connected by a rail.
TRSurface
An opaque themed background for a page or a routed content region.
TRSwitch
A binary on/off Tinyrack control.
TRTabDropDetails
One accepted tab movement between tab strips.
TRTable
A semantic data table with density, striping, and horizontal overflow.
TRTableColumn
TRTableFooter
TRTableRow
TRTabs
A full-width tab strip with optional panels, controls, closing, and dragging.
TRTabsDragConfiguration
Configures tab dragging for one TRTabs strip.
TRTabsTab
A single tab within TRTabs.
TRText
Text rendered with a named Tinyrack typography role.
TRTextarea
A themed multi-line text input.
TRTextField
A themed text input that preserves Flutter form and editing contracts.
TRToastController
Queues, updates, tracks, and dismisses toast notifications.
TRToastData
Content and lifecycle settings for one toast.
TRToastHandle
Stable reference returned when a toast is shown.
TRToastRegion
Renders a keyboard-accessible live toast region over its child.
TRToggle
A two-state pressable Tinyrack control.
TRToggleGroup
Coordinates the pressed state of a set of TRToggle children by value.
TRToolbar
A keyboard-navigable row of related application controls.
TRToolbarButton
A compact toolbar command.
TRToolbarGroup
A visually adjacent subset of toolbar controls.
TRToolbarInput
A compact text input embedded in a toolbar.
A toolbar navigation action.
TRToolbarSeparator
A vertical separator between toolbar groups.
TRTooltip
A hover, focus, and long-press description for a compact trigger.
TRTooltipController
Controls an uncontrolled TRTooltip.
TRTooltipProvider
Shared tooltip delay settings for a subtree.
TRTreeNav<T extends Object>
A hierarchical navigation tree with keyboard expansion and selection.
TRTreeNavController<T extends Object>
Owns tree expansion and selection state.
TRTreeNavGroup<T extends Object>
Expandable tree navigation group.
TRTreeNavItem<T extends Object>
Base class for tree navigation nodes.
TRTreeNavLeaf<T extends Object>
Selectable tree navigation destination.
TRTypography
Platform-resolved typography roles without semantic foreground colors.
TRUiDensityScope
Supplies semantic control, typography, indicator, and surface defaults to a subtree.
TRVirtualList<T, K>
A lazy, variable-size linear list with stable visual anchoring.
TRVirtualListController<K>
Imperative navigation and restoration access for TRVirtualList.
TRVirtualListEdgeRequest
Consumer-owned loading state and callback for one list edge.
TRVirtualListFixedTriggerExtent
A fixed logical-pixel edge request distance.
TRVirtualListInitialPosition<K>
The position used when a virtual list has no restorable snapshot.
TRVirtualListRange<K>
The data items intersecting the viewport.
TRVirtualListSnapshot<K>
An opaque, versioned virtual-list restoration value.
TRVirtualListTriggerExtent
A typed distance at which an edge request becomes eligible.
TRVirtualListViewportTriggerExtent
A viewport-relative edge request distance.
TRWindowFrame
Decorative desktop or browser chrome around application content.
TRWindowFrameAddressBar
TRWindowFrameBody
TRWindowFrameControl
TRWindowFrameControls
TRWindowFrameTitle
TRWindowFrameTitleBar

Enums

TRAdaptiveWidthClass
Canonical width classes for high-level adaptive application layouts.
TRAnimatedNumberAnimation
The visual transition used when an animated number changes.
TRAnimatedNumberRollDirection
The vertical direction used by the TRAnimatedNumberAnimation.roll mode.
TRAppearance
The visual emphasis of an action.
TRAppShellBreakpoint
Viewport boundary used by TRAppShell.
TRAppShellChrome
Content posture used by TRAppShell.
TRAppShellLayout
Whether the header or sidebar spans the leading corner.
TRAppShellMobileDrawerSide
Logical side used by the modal mobile drawer.
TRAppShellMobileSidebar
Mobile navigation presentation.
TRAppShellNavigationKind
Navigation operation used to restore page position.
TRAppShellPageScroll
Owner of page scrolling.
TRAppShellSidebarMode
Desktop sidebar presentation.
TRAutocompleteCompletionMode
How an autocomplete query is completed.
TRAvatarShape
The corner treatment of a TRAvatar.
TRCardPadding
The inset spacing of a card surface.
TRCardVariant
The visual treatment of a card surface.
TRChatMessageAlignment
How a chat message's leading visual aligns with its content.
TRChatMessageTone
Semantic emphasis of a leading visual in a chat message row.
TRChatToolStatus
Visual state of a tool or status entry in a chat transcript.
TRCodeHighlightFailureReason
TRCollapsibleAttachedEdge
The edge of an adjacent surface a TRCollapsible visually attaches to.
TRComboboxFilterMode
How a combobox narrows its option source against the current query.
TRComboboxLayout
Layout used by a combobox options popup.
TRCopyButtonStatus
The disclosed state of a TRCopyButton.
TRDialogPlacement
Logical dialog placement that follows the ambient text direction.
TRDrawerDragBehavior
Region that owns drag-to-snap and drag-to-dismiss gestures.
TRDrawerPlacement
Logical edge from which a drawer enters.
TRFieldAppearance
The visual chrome drawn around an input control.
TRFieldPadding
The inline inset a field draws its own content at.
TRInlineSuggestionsStatus
Whether a suggestion list is settled, still loading, or failed.
TRIntent
The semantic purpose of a Tinyrack control or status.
TRLayerPlacement
Logical placement of an anchored Tinyrack layer.
TRLinkUnderline
When a link's underline is visible.
TRLinkVariant
The semantic emphasis of a link's foreground color.
TRPaneRole
Stable semantic roles in a navigation, collection, and detail hierarchy.
TRRadioLabelAlignment
How a radio glyph aligns with its label.
TRSeparatorOrientation
The axis a separator divides content along.
TRSeparatorVariant
The visual emphasis of a separator line.
TRSkeletonShape
The placeholder shape a skeleton renders.
TRSpinnerVariant
The semantic color of a progress spinner.
TRStatusVariant
The semantic variants supported by alerts and badges.
TRTableDensity
TRTabsWidth
Controls how TRTabs distributes the width of its tab items.
TRTextAlign
Logical text alignment shared with Tinyrack web components.
TRTextColor
Semantic text colors shared with Tinyrack web components.
TRTextVariant
Named typography variants shared with Tinyrack web components.
TRTextWeight
Named typography weights shared with Tinyrack web components.
TRToastPlacement
Logical viewport position of a toast stack.
TRUiDensity
The default visual scale used by an interface subtree.
TRUiSize
The shared control size scale.
TRVirtualListAlignment
How an item is placed inside the viewport by controller navigation.
TRVirtualListEdge
A logical end of a TRVirtualList.
TRVirtualListFollow
The edge that remains pinned while content changes there.
TRWindowFrameControlTone
TRWindowFramePadding
TRWindowFrameVariant

Extensions

TinyrackThemeContext on BuildContext
Accesses Tinyrack semantic colors from a build context.

Constants

trNativeContextMenuChannel → const MethodChannel
The channel the desktop embedders answer with a system menu.
trNativeContextMenuNotShown → const String
The error code an embedder reports when no menu reached the screen.

Functions

formatAnimatedNumber(double value, {int fractionDigits = 0, String? locale}) String
Formats value with locale-aware grouping and a fixed decimal precision.
getTRPaginationRange({required int currentPage, required int totalPages, int boundaryCount = 1, int siblingCount = 1}) List<TRPaginationRangeItem?>
Returns the visible page sequence for a pagination control.
showTRAlertDialog<T>({required BuildContext context, required WidgetBuilder builder, String? barrierLabel, bool useRootNavigator = true, bool useSafeArea = true, RouteSettings? routeSettings, Offset? anchorPoint, bool? requestFocus}) Future<T?>
Shows an alert dialog that ignores backdrop taps but supports Escape and back.
showTRDialog<T>({required BuildContext context, required WidgetBuilder builder, bool barrierDismissible = true, String? barrierLabel, bool useRootNavigator = true, bool useSafeArea = true, RouteSettings? routeSettings, Offset? anchorPoint, bool? requestFocus}) Future<T?>
Shows a modal Tinyrack dialog and resolves with the value passed to pop.
showTRDrawer<T>({required BuildContext context, required WidgetBuilder builder, TRDrawerPlacement placement = TRDrawerPlacement.bottom, bool barrierDismissible = true, String? barrierLabel, bool useRootNavigator = true, bool useSafeArea = false, RouteSettings? routeSettings, bool? requestFocus}) Future<T?>
Shows a modal drawer route and returns the value passed to Navigator.pop.
trMenuElementWidgets(List<TRMenuElement> elements) List<Widget>
Renders elements with the Tinyrack menu components.

Typedefs

TRAnimatedNumberFormatter = String Function(double value)
Formats a value displayed by TRAnimatedNumber.
TRAutocompleteOptionsBuilder<T extends Object> = FutureOr<Iterable<TRAutocompleteItem<T>>> Function(String query)
TRCodeHighlighter = Future<TRCodeHighlightResult?> Function(TRCodeHighlightRequest request)
Highlights code or returns null when the language is unsupported.
TRComboboxFilter<T extends Object> = bool Function(TRComboboxItem<T> item, String query)
Decides whether an option survives the current query.
TRComboboxOptionsBuilder<T extends Object> = FutureOr<Iterable<TRComboboxItem<T>>> Function(String query)
TRMenuElementsBuilder = List<TRMenuElement> Function(BuildContext context)
Builds the elements a context menu shows when it is about to open.
TROtpSeparatorBuilder = Widget Function(BuildContext context, int index)
TRPaginationRangeItem = int?
A page number, or null for a collapsed gap.
TRSelectFilter<T> = bool Function(TRSelectItem<T> item, String query)
Matches an option against the current query.
TRSliderLabelBuilder = String Function(double value)
Converts a slider value to its visible and semantic label.