carbide library

Carbide — an unofficial Flutter port of the IBM Carbon Design System.

Carbide uses Flutter base widgets and SDK rendering, painting, services and semantics libraries. Library code imports no Material or Cupertino.

Import this barrel for the supported public API. All exports follow the stability policy. Advanced building blocks are explicitly marked in their documentation; direct imports from src are internal and carry no compatibility promise.

Classes

AnimatedCarbonTheme
A CarbonTheme that animates token changes over duration.
CarbonAccordion
A list of collapsible CarbonAccordionItems.
CarbonAccordionItem
A single collapsible accordion section.
CarbonAccordionSkeleton
A loading placeholder for an accordion.
CarbonActionableNotification
A nonmodal announcement with an optional response button.
CarbonAILabel
Marks AI-generated content with an "AI" affordance that opens an explanatory callout.
CarbonAISkeletonIcon
An AI skeleton icon: a shimmering square, 16px by default.
CarbonAISkeletonPlaceholder
An AI skeleton placeholder: a shimmering rectangle, 100×100 by default.
CarbonAISkeletonText
AI skeleton text: the SkeletonText geometry on the AI shimmer.
CarbonAspectRatio
Constrains child to one of Carbon's fixed aspect ratios.
CarbonBadgeIndicator
A small notification badge: a dot, or a count (capped at 999+).
CarbonBreadcrumb
A breadcrumb trail of items separated by slashes.
CarbonBreadcrumbItem
A single crumb in a CarbonBreadcrumb.
CarbonBreadcrumbSkeleton
A loading placeholder for a breadcrumb trail.
CarbonBreakpoint
A Carbon responsive breakpoint: its minimum width, grid columns, and margin.
CarbonButton
A Carbon button.
CarbonButtonSet
A Carbon button set: adjacent equal-width buttons with a 1px separator.
CarbonButtonSkeleton
A loading placeholder for a CarbonButton; 150px wide at the button height of size.
CarbonCalendar
A self-contained month calendar for picking a date or a date range.
CarbonCallout
A static, non-dismissible callout that highlights page content.
CarbonChatButton
A Carbon AI chat button.
CarbonCheckbox
A Carbon checkbox.
CarbonCheckboxGroup
A labelled group of checkboxes with a shared legend and group-level helper / validation messaging (<fieldset> + <legend>).
CarbonCheckboxSkeleton
A loading placeholder for a checkbox.
CarbonClickableTile
A clickable Carbon tile: a single interactive region.
CarbonCodeSnippet
Displays monospaced code with a copy affordance.
CarbonCodeSnippetSkeleton
A loading placeholder for a CarbonCodeSnippet.
CarbonColors
The complete Carbon color palette as immutable Color constants.
CarbonColumn
A column within a CarbonGrid.
CarbonComboBox<T>
A Carbon combo box: a single-select picker whose field filters the options as you type.
CarbonComboBoxItem<T>
A single option in a CarbonComboBox.
CarbonComboButton
A split button: a primary action plus a chevron opening a CarbonMenu of secondary actions.
CarbonContainedList
A titled list of CarbonContainedListItems separated by hairline rules.
CarbonContainedListItem
A single row in a CarbonContainedList.
CarbonContainer
Container heights ($container-*), in logical pixels.
CarbonContentSwitcher
A horizontal segmented control that selects one of several switches.
CarbonContextMenu
Opens a CarbonMenu on secondary click, long press or a context-menu key.
CarbonCopy
An icon button that shows a transient feedback bubble when activated.
CarbonCopyButton
A copy-to-clipboard icon button.
CarbonDataTable
A Carbon data table.
CarbonDataTableSkeleton
A loading placeholder for a data table.
CarbonDateFormat
A date's formatting pattern and matching formatter/parser pair.
CarbonDatePicker
A Carbon date picker: a field that opens a CarbonCalendar.
CarbonDatePickerLocalizations
Injectable date-picker text, week layout and formatting.
CarbonDatePickerSkeleton
A loading placeholder for a date picker.
CarbonDateRange
An inclusive date range; end is null while a range is in progress.
CarbonDateRangePicker
A Carbon date range picker: two fields sharing one range CarbonCalendar.
CarbonDialog
A composable Carbon dialog.
CarbonDialogBody
The scrollable dialog content (--dialog-content + --dialog-scroll-content): padding-block $spacing-03 $spacing-09, padding-inline $spacing-05, with the bottom fade that marks scrollable content (the CSS mask-image, approximated with a layer-colored gradient overlay).
CarbonDialogCloseButton
The 48px dialog close button (--dialog__close): transparent at rest, layer-hover on hover, a 2px focus border when focused.
CarbonDialogControls
The header's top-end action cluster (--dialog__header-controls).
CarbonDialogFooter
The dialog footer (--dialog-footer): a 64px end-aligned button row where each button takes up to half the width.
CarbonDialogHeader
The dialog header band: padding-block-start $spacing-05, padding-inline $spacing-05 $spacing-09, min height $spacing-09, 8px bottom margin, with controls pinned to the top end.
CarbonDialogSubtitle
The dialog's overline label (--dialog-header__label, label-01).
CarbonDialogTitle
The dialog title (heading-03), kept clear of the header controls.
CarbonDismissibleTag
A tag with a dismiss ("filter") button.
CarbonDropdown<T>
A Carbon dropdown: a single-select picker on the ListBox chrome.
CarbonDropdownItem<T>
A single option in a CarbonDropdown.
CarbonDropdownSkeleton
A loading placeholder for a dropdown.
CarbonDuration
Carbon motion durations.
CarbonEasing
Carbon motion easing curves, as Flutter Cubic curves.
CarbonExpandableSearch
A search that collapses to a single magnifier button and expands to the full field on tap/focus, collapsing again on blur when empty.
CarbonExpandableTile
An expandable Carbon tile: above-the-fold content always shown, with below-the-fold content revealed on expansion.
CarbonField
The presentational Carbon field surface (cds--text-input chrome).
CarbonFieldRequirement
The validation message beneath a field (cds--form-requirement).
CarbonFileUploader
The labelled file-uploader container: an optional title and description, the upload control (CarbonFileUploaderButton or CarbonFileUploaderDropContainer), and the list of selected files.
CarbonFileUploaderButton
A button that opens the host's file picker.
CarbonFileUploaderDropContainer
A dashed drag-and-drop zone that also opens the file picker on click.
CarbonFileUploaderItem
A selected-file row: the filename, a status icon, and (when invalid) an error message.
CarbonFileUploaderSkeleton
A loading placeholder for a file uploader (label + drop button).
CarbonFluidForm
Opts every fluid-capable descendant field into the fluid treatment.
CarbonFluidText
Text that automatically selects a Carbon fluid type style.
CarbonFluidTextStyle
A Carbon fluid (responsive) type style.
CarbonFluidTypeStyles
The Carbon fluid (responsive) type styles.
CarbonFocusRing
Carbon's focus indicator: a thicknesspx ring in the theme's focus token, drawn inside child's bounds.
CarbonFontFamily
Font families used by Carbon, bundled with this package.
CarbonFontWeight
The font weights Carbon uses.
CarbonFormGroup
A labelled group of related controls (<fieldset> + <legend>).
CarbonFormItem
The vertical stack of a single form field: label, control, then helper or requirement text (cds--form-item).
CarbonFormLabel
A Carbon form label (label-01, text-secondary).
CarbonGrid
A responsive 2x Grid.
CarbonHeader
The UI Shell header bar, with a 48px minimum height.
CarbonHeaderGlobalAction
A trailing icon button in the header's global bar.
CarbonHeaderMenu
A header navigation dropdown: a label that opens a CarbonMenu of items.
CarbonHeaderMenuButton
The leading hamburger button that toggles the SideNav.
CarbonHeaderMenuItem
A header navigation link, underlined when selected.
CarbonHeaderName
The product name shown at the start of a CarbonHeader.
CarbonHeaderPanel
A right-side panel under the header that slides open (0 → 256px), hosting a CarbonSwitcher or notification content.
CarbonHeaderSideNavItems
Header navigation rendered in the side nav below CarbonBreakpoint.lg.
CarbonHeading
A heading at the ambient CarbonSection level.
CarbonHelperText
Helper text shown beneath a field (helper-text-01, text-helper).
CarbonIcon
Renders a Carbon icon.
CarbonIconArtwork
Advanced API. A supported low-level building block. Prefer the family widgets or generated artwork constants unless custom composition requires it. Changes follow the published compatibility policy; advanced does not mean breaking changes may be shipped silently in patch releases.
CarbonIconButton
An icon-only button that shows its label in a tooltip on hover and focus.
CarbonIconData
Advanced API. A supported low-level building block. Prefer the family widgets or generated artwork constants unless custom composition requires it. Changes follow the published compatibility policy; advanced does not mean breaking changes may be shipped silently in patch releases.
CarbonIconIndicator
A status indicator: a coloured status icon followed by a label.
CarbonIconPainter
Paints one CarbonIconArtwork variant in a single color.
CarbonIcons
Every Carbon icon, as generated CarbonIconData constants.
CarbonIconShape
Advanced API. A supported low-level building block. Prefer the family widgets or generated artwork constants unless custom composition requires it. Changes follow the published compatibility policy; advanced does not mean breaking changes may be shipped silently in patch releases.
CarbonIconSize
Icon sizes ($icon-size-*), in logical pixels.
CarbonInlineLoading
Loading feedback inline with content (e.g. inside a button or form row).
CarbonInlineNotification
An inline notification, shown within page content.
CarbonInteraction
The reusable interactive base for Carbon components.
CarbonLayer
Carbon's contextual layering model.
CarbonLayerTokens
The contextual tokens for one layer level of a theme.
A Carbon link.
CarbonListBox
The field trigger surface for a list-box control.
CarbonListBoxMenu
The popup list of options under a CarbonListBox.
CarbonListBoxMenuIcon
The chevron at the end of a CarbonListBox field, rotating 180° when open. Advanced API. A supported low-level building block. Prefer the family widgets or generated artwork constants unless custom composition requires it. Changes follow the published compatibility policy; advanced does not mean breaking changes may be shipped silently in patch releases.
CarbonListBoxMenuItem
A single option row inside a CarbonListBoxMenu.
CarbonListBoxSelection
The clear (X) control inside a CarbonListBox field. Advanced API. A supported low-level building block. Prefer the family widgets or generated artwork constants unless custom composition requires it. Changes follow the published compatibility policy; advanced does not mean breaking changes may be shipped silently in patch releases.
CarbonListBoxSelectionCount
The multi-select count badge (a pill showing how many items are selected with an inline clear control). Advanced API. A supported low-level building block. Prefer the family widgets or generated artwork constants unless custom composition requires it. Changes follow the published compatibility policy; advanced does not mean breaking changes may be shipped silently in patch releases.
CarbonListItem
One row of a Carbon list.
CarbonLoading
The Carbon loading spinner.
CarbonLoadingPainter
Paints the Carbon spinner arc (and the small variant's track).
CarbonMenu
A floating action menu: a shadowed surface of children rows that the user roves with the keyboard.
CarbonMenuButton
A labelled button with a chevron that opens a CarbonMenu.
CarbonMenuItem
A single selectable row in a CarbonMenu.
CarbonMenuItemDivider
A 1px divider between menu sections (_menu.scss MenuItemDivider).
CarbonMenuItemGroup
A labelled group of menu items.
CarbonMenuItemRadioGroup<T>
A single-select group of radio menu items.
CarbonMenuItemSelectable
A toggleable menu item showing a leading checkmark when selected.
CarbonModal
A centered modal dialog over a scrim.
CarbonModalAction
A labelled footer action for a CarbonModal.
CarbonMultiSelect<T>
A Carbon multi-select: a multi-choice picker with a selection-count badge and checkbox menu rows.
CarbonMultiSelectItem<T>
A single option in a CarbonMultiSelect.
CarbonNumberInput
A Carbon number input: a numeric field with increment/decrement steppers.
CarbonNumberInputSkeleton
A loading placeholder for a number input.
CarbonOperationalTag
A clickable tag (OperationalTag) that triggers an action, e.g. viewing a filtered list. Colored like read-only tags but with a 1px border in the type's border token and a hover fill.
CarbonOrderedList
An ordered (numbered) Carbon list.
CarbonOverflowMenu
An icon button (⋮) that opens a CarbonMenu of actions.
CarbonPageHeader
A page-level header band with a title, optional breadcrumb, description and tabs.
CarbonPageHeaderAction
A named action in a CarbonPageHeader's responsive action area.
CarbonPagination
A pagination footer bar.
CarbonPaginationLocalizations
Injectable pagination labels and formatting, following the date-picker's delegate approach. Consumers can adapt their own formatting backend without adding a dependency to Carbide. Direction comes from ambient directionality.
CarbonPaginationNav
Page-number navigation with previous/next arrows and overflow truncation.
CarbonPaginationSkeleton
A loading placeholder for the pagination bar.
CarbonPasswordInput
A password input: a CarbonTextInput that obscures its text with a show/hide toggle (View / ViewOff).
CarbonPictogram
Renders a Carbon pictogram.
CarbonPictograms
Every Carbon pictogram, as generated CarbonIconData constants.
CarbonPopover
A floating surface anchored to a trigger.
CarbonProgressBar
A Carbon progress bar.
CarbonProgressIndicator
A stepper showing progress through a sequence of steps.
CarbonProgressIndicatorSkeleton
A loading placeholder for a progress indicator.
CarbonProgressStep
A single step in a CarbonProgressIndicator.
CarbonRadioButton
A single Carbon radio button (the circle + label).
CarbonRadioButtonGroup<T>
A single-select group of radio buttons (<fieldset> + <legend>).
CarbonRadioButtonSkeleton
A loading placeholder for a radio button.
CarbonRadioTile
A single-select tile with radio semantics.
CarbonSearch
A Carbon search field.
CarbonSearchSkeleton
A loading placeholder for a search field (full-width 40px bar).
CarbonSection
Raises the ambient heading level for its subtree.
CarbonSelect<T>
A Carbon select (single-choice picker).
CarbonSelectableTag
A toggleable tag (SelectableTag).
CarbonSelectableTile
A multi-selectable Carbon tile with checkbox semantics.
CarbonSelectEntry<T>
An entry in a CarbonSelect: either an item or a group of items.
CarbonSelectItem<T>
A single selectable option.
CarbonSelectItemGroup<T>
A labelled group of CarbonSelectItems (<optgroup>).
CarbonSelectSkeleton
A loading placeholder for a select.
CarbonShapeIndicator
A colour-blind-safe status indicator: a distinct shape followed by label.
CarbonShellContent
The main content region of the UI Shell — a main landmark for the page body beside the header and side navigation.
CarbonSideNav
The left navigation panel of the UI Shell.
CarbonSideNavDivider
A 1px divider between side-nav sections.
A side-nav navigation link.
CarbonSideNavMenu
A collapsible side-nav menu grouping children.
CarbonSideNavMenuItem
A side-nav sub-item inside a CarbonSideNavMenu.
CarbonSize
Fixed element heights ($size-*), in logical pixels.
CarbonSkeleton
The Carbon skeleton shimmer: the base building block of every loading placeholder.
CarbonSkeletonIcon
A loading placeholder for an icon; 16×16 by default.
CarbonSkeletonPhase
The evaluated shimmer state at one point of the skeleton animation.
CarbonSkeletonPlaceholder
A plain rectangular loading placeholder; 100×100 by default.
CarbonSkeletonText
Placeholder lines for loading text.
CarbonSkipToContent
A skip-to-content link, visible only when focused (a11y aid).
CarbonSlider
A Carbon slider.
CarbonSliderSkeleton
A loading placeholder for a slider.
CarbonSpacing
The Carbon spacing scale, in logical pixels.
CarbonStack
Carbon's spacing layout helper: children laid out along one axis with a uniform gap from the spacing scale.
CarbonStructuredList
A lightweight table-like list with a header and body rows.
CarbonStructuredListRow
A row in a CarbonStructuredList.
CarbonStructuredListSkeleton
A loading placeholder for a structured list.
CarbonSwitch
A single segment of a CarbonContentSwitcher.
CarbonSwitcher
A list of product/account links shown inside a CarbonHeaderPanel.
CarbonSwitcherDivider
A 1px divider between switcher sections.
CarbonSwitcherItem
A single switcher link.
CarbonTab
A single tab in a CarbonTabs.
CarbonTableBatchAction
An action shown in a CarbonDataTable's batch-actions bar.
CarbonTableColumn
A column definition for a CarbonDataTable.
CarbonTableRow
A row of cells for a CarbonDataTable.
CarbonTableToolbar
A toolbar shown above a CarbonDataTable.
CarbonTabs
A tabbed interface: a row of tabs with a matching panel each.
CarbonTabsSkeleton
A loading placeholder for a tabs bar.
CarbonTabsVertical
Vertical tabs: a scrollable column of contained tabs beside its panel.
CarbonTag
A read-only Carbon tag.
CarbonTagColors
The resolved colors for one tag type under one theme/layer context.
CarbonTagSkeleton
A loading placeholder for a tag: a 60px pill.
CarbonText
Text styled with a Carbon type style and the theme's text color.
CarbonTextArea
A Carbon multi-line text area.
CarbonTextAreaSkeleton
A loading placeholder for a text area.
CarbonTextInput
A Carbon text input.
CarbonTextInputSkeleton
A loading placeholder for a text input.
CarbonTheme
Provides a CarbonThemeData to its descendants.
CarbonThemeData
The resolved semantic color tokens for one Carbon theme.
CarbonTile
A static Carbon tile: a contextual surface for grouped content.
CarbonTileGroup<T>
A single-select group of CarbonRadioTiles (<fieldset> + <legend>).
CarbonTileSpec
Shared tile geometry per _tile.scss.
CarbonTimeFormat
A time's concrete pattern and matching formatter/parser pair.
CarbonTimePicker
A compact time field followed by inline CarbonTimePickerSelects.
CarbonTimePickerSelect<T>
A compact, content-width CarbonSelect for use inside a CarbonTimePicker (e.g. AM/PM or timezone). Its label is hidden but read by screen readers.
CarbonTimeValue
A civil time without a date or timezone, stored in the 24-hour cycle.
CarbonToastNotification
A floating toast notification with stacked title/subtitle and optional caption, included in its announcement. Uses the same announcement and focus policy as CarbonInlineNotification.
CarbonToggle
A Carbon toggle switch.
CarbonToggleSkeleton
A loading placeholder for a toggle.
CarbonToggletip
A click-triggered popover holding interactive content.
CarbonTooltip
A small label shown on hover and keyboard focus of child.
CarbonTreeNode
One node in a CarbonTreeView; parents carry children.
CarbonTreeView
A hierarchical tree view of CarbonTreeNodes.
CarbonTypeScale
The 23-step Carbon type scale, in logical pixels.
CarbonTypeStyles
The fixed (non-fluid) Carbon type styles as TextStyles.
CarbonUnorderedList
An unordered (bulleted) Carbon list.

Enums

CarbonAccordionAlign
Which side of the title row the chevron sits on.
CarbonAILabelSize
The size of a CarbonAILabel trigger button.
CarbonAspectRatioValue
Carbon's fixed aspect ratios.
CarbonButtonKind
The Carbon button kinds.
CarbonButtonSize
The Carbon button sizes and their fixed heights.
CarbonChatButtonSize
The chat button sizes and their pill radii (_chat-button.scss).
CarbonCodeSnippetType
The presentation of a CarbonCodeSnippet.
CarbonContainedListKind
How a CarbonContainedList presents its header.
CarbonContainedListSize
The row height of a CarbonContainedList.
CarbonCopySize
The square edge length of a copy button.
CarbonCounterMode
The unit used by the text-area input limit and counter.
CarbonDropdownDirection
Where a CarbonDropdown opens its menu relative to the field.
CarbonEasingMode
The expressiveness mode of an easing curve.
CarbonEasingStyle
The kind of motion, which selects an easing curve.
CarbonFieldSize
The Carbon field heights ($size-* via the density scale).
CarbonFieldStatus
The validation state of a field.
CarbonFileStatus
The upload status of a CarbonFileUploaderItem.
CarbonFluidSpacing
Viewport-relative Carbon spacing tokens.
CarbonFluidTextWidthSource
The width used to select a fluid typography breakpoint.
CarbonGridMode
The gutter behaviour of a CarbonGrid.
CarbonIconIndicatorKind
The kind of a CarbonIconIndicator: an icon and a status colour.
CarbonInlineLoadingStatus
The inline loading states.
CarbonLinkSize
The Carbon link sizes and their type styles.
CarbonMenuAlignment
Which trigger edge the menu aligns to.
CarbonMenuItemKind
The visual kind of a CarbonMenuItem.
CarbonMenuSize
The item height of a CarbonMenu (_menu.scss supported sizes).
CarbonModalSize
The width of a CarbonModal.
CarbonNotificationKind
The status of a notification.
CarbonOverlaySide
The preferred side of an anchored surface.
CarbonPaginationNavSize
The button height of a CarbonPaginationNav.
CarbonPopoverAlignment
Where a CarbonPopover sits relative to its trigger.
CarbonProgressBarSize
The progress bar track heights.
CarbonProgressBarStatus
The progress bar status.
CarbonProgressBarType
How the progress bar arranges its label, track, and helper text.
CarbonRadioLabelPosition
Whether a radio's label sits before or after the circle.
CarbonShapeIndicatorKind
The kind of a CarbonShapeIndicator: a colour-blind-safe shape + status.
CarbonSortDirection
The sort state of a CarbonDataTable column.
CarbonTabActivationMode
Whether moving keyboard focus also selects a tab.
CarbonTableSelection
How a CarbonDataTable's rows may be selected.
CarbonTableSize
The row height of a CarbonDataTable (_data-table.scss size variants).
CarbonTabsVerticalSize
The row height of a CarbonTabsVertical.
CarbonTabVariant
The visual style of a CarbonTabs.
CarbonTagSize
The Carbon tag sizes and their fixed heights.
CarbonTagType
The Carbon tag color types.
CarbonTimeHourCycle
The hour cycle used by a time format and its coordinated period selector.
CarbonTimePeriod
The half of a day selected for a twelve-hour time.
CarbonToggleSize
The Carbon toggle sizes and their geometry.
CarbonTreeSize
The tree row heights (min-block-size).

Functions

carbonDuration(BuildContext context, Duration duration) → Duration
Resolves a decorative motion duration against the platform preference.
carbonListBoxActiveOptionLabel(String label, int position, int count) → String
The default English keyboard-highlight announcement.
carbonTableSortDirectionLabel(CarbonSortDirection direction) → String
Describes a table column's sort state in English.

Typedefs

CarbonDateFormatter = String Function(DateTime date)
Formats a civil date for display.
CarbonDateParser = DateTime? Function(String text)
Parses a formatted civil date, returning null when the input is invalid.
CarbonInteractionBuilder = Widget Function(BuildContext context, Set<WidgetState> states)
Builds a widget from the current set of interaction states.
CarbonListBoxActiveOptionFormatter = String Function(String label, int position, int count)
Formats a keyboard-highlighted option without implying selection.
CarbonPaginationNumberFormatter = String Function(int value)
Formats a number displayed in a page or page-size control.
CarbonPaginationRangeFormatter = String Function(int start, int end, int total)
Formats an item range, including the total result count.
CarbonTableSortDirectionFormatter = String Function(CarbonSortDirection direction)
Formats the complete sort-state announcement for a table header.
CarbonTimeFormatter = String Function(CarbonTimeValue time)
Formats a canonical civil time with a configured concrete pattern.
CarbonTimeParser = CarbonTimeValue? Function(String text, CarbonTimePeriod period)
Parses text using the selected period, returning null for invalid input.