Skip to content
Cynosurev0.5.0
SearchStorybookGitHubnpmColour mode: System. Switch to Light

Components / Overlays

ProgressOverlay

A modal progress dialog for long work the page has to wait for.

Shows how far it has got

When to useLink to "When to use"

  • Blocking work that takes seconds or more: exporting, compressing, converting a document.

Use something else when:

  • people can keep working meanwhile: a ProgressBar in the page, or a Toast when it is done
  • it takes under a second: LoadingDots or nothing

UsageLink to "Usage"

tsx
Copy
import { ProgressOverlay } from "@arshad-shah/cynosure";

<ProgressOverlay open={running} title="Compressing the PDF" value={page} max={pages} onCancel={stop} />

Leave value undefined while the amount is unknown. Give onCancel whenever the work can be stopped; without it the overlay cannot be closed.

PropsLink to "Props"

Every prop of ProgressOverlay
PropWhat it doesTypeDefault
openRequired
Show it.boolean
titleRequired
What is happening ("Compressing the PDF"). Names the dialog and the progress bar.string
value
How far it has got; leave undefined while the amount is unknown.number
max
The value that means complete. Default 100.number100
status
A line under the bar ("Page 3: images"). Default: the count, or "Working…". Read out politely as it changes.stringthe count
onCancel
Cancels the work: the Cancel button and Escape. Without it the overlay cannot be closed.(() => void)
labels
Replace the built-in English text: the Cancel button and the status line.Partial<ProgressOverlayLabels>
className
Added to the dialog's panel, for layout.string
style
Layout only.CSSProperties

Generated from the type definitions in @arshad-shah/cynosure 0.5.0.

Behaviour and accessibilityLink to "Behaviour and accessibility"

  • Role: a modal dialog named by title, holding a progress bar with the same name.
  • Announcements: the status line ("3 of 12", or your status) is a polite live region.
  • Keyboard: focus moves into the dialog and stays there; Escape cancels (only with onCancel); focus returns where it was when it closes.
Unknown amount

ThemingLink to "Theming"

No tokens of its own: style it through the Dialog and ProgressBar tokens.

Dialog · ProgressBar

These examples run Cynosure 0.5.0 (commit 50ce30b), the version on npm.

Getting started
Theming
Icons
Accessibility
Code editors and highlighters
Using Cynosure without React
Build-tool adapters
Components
Accordion
AppShell
AspectRatio
Breadcrumbs
Calendar
Card
Container
Disclosure
Divider
DocumentViewport
Grid
Inline
PageHeader
PanZoomCanvas
ScrollArea
SideNav
SortableList
SplitPane
Stack
StatusBar
Tabs
TitleBar
Toolbar
Tree
VirtualList
ZoomControls
Announcer
Avatar
Badge
CodeBlock
DescriptionList
EmptyState
ErrorBoundary
Field
Heading
IconTile
Image
Kbd
List
LoadingDots
Notice
ProgressBar
Prose
Skeleton
Stat
Steps
Table
Text
Button
Checkbox
Checklist
ColorField
ColorSwatches
Combobox
CompareSlider
CopyButton
DateField
FileDrop
IconButton
KeyValueEditor
Link
NumberField
Pagination
PathField
RadioGroup
SearchField
SegmentedControl
Select
SelectionFrame
SignaturePad
Slider
Switch
TagInput
TextArea
TextField
ThemeToggle
TimeField
ButtonBase
ChoiceBase
DialogBase
FileInputBase
HiddenValue
Icon
InputBase
LinkBase
LiveRegion
TextAreaBase
ChatMessage
Choice
DataGrid
DeviceFrame
HighlightedText
HotkeyField
ListRow
OptionList
OverlayFrame
QRCode
RowActions
Section
SiteFooter
SiteHeader
SkipLink
SortButton
VisuallyHidden
CommandPalette
ContextMenu
Dialog
FloatingToolbar
HoverCard
Menu
Menubar
Popover
ProgressOverlay
Sheet
Toast
Tooltip
Changelog