@blueprintjs/core
Version:
Core styles & components
71 lines (43 loc) • 2.46 kB
Markdown
@class="@ns-callout @ns-intent-primary @ns-icon-info-sign">
<h4 class="@ns-heading">Terminology note</h4>
The term "modal" is sometimes used to mean "dialog," but this is a misnomer.
_Modal_ is an adjective that describes parts of a UI.
An element is considered modal if it
[ ](https://en.wikipedia.org/wiki/Modal_window).
We use the term "dialog" to avoid confusion with the adjective.
</div>
Blueprint provides two types of dialogs:
1. Standard dialog: use the `Dialog` component for a dialog that only requires one view.
1. Multistep dialog: use the `MultistepDialog` component for a dialog with multiple sequential views.
@
@reactExample DialogExample
@
`Dialog` is a stateless React component controlled by the `isOpen` prop.
The children you provide to this component are rendered as contents inside the
`Classes.DIALOG` element. Typically, you will want to provide a child with
`Classes.DIALOG_BODY` that contains the body content and a child with
`Classes.DIALOG_FOOTER` that contains the action buttons.
@interface IDialogProps
@
You can create dialogs manually using the HTML markup and `@ns-dialog-*` classes below.
However, you should use the [`Dialog` component](
whenever possible, as they automatically generate some of this markup.
More examples of dialog content are shown below.
@css dialog
@
@reactExample MultistepDialogExample
@
`MultistepDialog` is a wrapper around `Dialog` that displays a dialog with multiple steps, each of which maps to a specific panel.
The children you provide to this component are rendered as contents inside the
`Classes.DIALOG` element. Typically, you will want to render a panel with
`Classes.DIALOG_BODY` that contains the body content for each step.
Children of the `MultistepDialog` are filtered down to only `Step` components and rendered in order.
`Step` children are managed by the component; clicking one will change selection.
@interface IMultistepDialogProps
@
`Step` is a minimal wrapper with no functionality of its own—it is managed entirely by its
parent `MultistepDialog` wrapper. Step title text can be set via the `title` prop.
The associated step panel will be visible when the `Step` is selected.
@interface IStepProps
Dialogs present content overlaid over other parts of the UI.
<div