Common UI kit components
Confluence UI kit components
Jira UI kit components

Rate this page:

Fragment

Returns a list of components. Similar to React’s Fragment.

Screenshot of rendered Fragment example

Usage notes

Because a function can only return one top-level component, this component is used for wrapping a list of top-level components.

Import statement

1
import ForgeUI, { Fragment } from '@forge/ui';

Props

NameTypeRequiredDescription
childrenArray<ForgeComponent>YesA container for displaying multiple components. Can contain any UI kit component.

Example

1
2
3
4
5
6
const App = () => (
  <Fragment>
    <Text>Hello world!</Text>
    <Button text="Do something" onClick={onClick} />
  </Fragment>
);

Rate this page: