EmptyState¶
EmptyState fills a screen or list that has nothing to show yet. It shows a message and, if you want, a button.
Usage¶
Call Components.EmptyState with a scope and a table of properties:
C.EmptyState(scope, {
Title = "No messages",
Subtitle = "New messages will show up here.",
Action = { Text = "Compose", Variant = "Filled", OnClick = compose }, -- (1)!
})
Actionis a table of Button properties.
Properties¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Theme |
ThemeRef |
The contextual theme | Theme to use for this component instead of the one from Theme.Provide. |
|
LayoutOrder |
UsedAs<number> |
0 |
Position in a parent UIListLayout or UIGridLayout. |
|
Size |
UsedAs<UDim2> |
- | Size of the component. | |
Title |
UsedAs<string> |
- | Main message. | |
Subtitle |
UsedAs<string> |
- | Smaller text under the title. | |
Action |
ButtonProps |
- | Properties of a Button to show under the text. |