Empty
Explain what to do when a list has no rows.
Examples
Explain what to do when a list has no rows
React code
import { Empty } from "@accelerate/react/components";
export function Example() {
return (
<>
<Empty>
<h3>No assigned work</h3>
<p>New assignments will appear here.</p>
<a href="/components/">Browse available components</a>
</Empty>
</>
);
}Angular code
import { Component } from "@angular/core";
import { AccEmpty } from "@accelerate/angular/components";
@Component({
selector: "app-example",
imports: [
AccEmpty,
],
template: `
<div accEmpty>
<h3>No assigned work</h3>
<p>New assignments will appear here.</p>
<a href="/components/">Browse available components</a>
</div>
`,
})
export class Example {}Installation
Source preview. The expanded component catalog is ahead of the public npm releases. To run these examples in your own application, use packages built from the SDK source used for the previews or a release that includes the APIs below.
- React
@accelerate/ui@0.4.0and@accelerate/react@0.4.0- Angular
@accelerate/ui@0.4.0and@accelerate/angular@0.2.0
Load @accelerate/ui/theme.css and put acc-theme on the app or the region using Accelerator components. See the framework setup guide for the theme and adapter conventions.
Usage
Compose a heading, description, and optional action.
Import the React component Empty from @accelerate/react/components. For Angular, add AccEmpty to the standalone component’s imports and use <div accEmpty>.
Examples use these React parts: Empty. The Angular examples show the corresponding directives and template hosts.
API reference
- Content
- Explain which list is empty and offer a relevant next step when one exists.
- Status messaging
- Announce a dynamically loaded result from the surrounding application.