ComponentsCollection
Collection
Collection combines a list of items with controls for the view. The list can be a Table and the controls can be a Search, Filters, and Pagination.
Muted
Base
1 — 25 of 74
1 — 25 of 74
import {
Collection,
CollectionRow,
CollectionView,
Pagination,
Search,
} from '@vtex/shoreline'
import { DecorativeBox } from '../components/decorative-box'
export default function Example() {
return (
<Collection>
<CollectionRow>
<Search />
<Pagination page={1} total={74} />
</CollectionRow>
<CollectionView status="ready">
<DecorativeBox subtle height="25rem" />
</CollectionView>
<CollectionRow align="flex-end">
<Pagination page={1} total={74} />
</CollectionRow>
</Collection>
)
}
Examples
Filter
Muted
Base
1 — 25 of 74
1 — 25 of 74
import {
Collection,
CollectionView,
Filter,
FilterItem,
Pagination,
Search,
CollectionRow,
Stack,
} from '@vtex/shoreline'
import { DecorativeBox } from '../components/decorative-box'
export default function Example() {
return (
<Collection>
<CollectionRow>
<Stack horizontal>
<Search />
<Filter label="Status">
<FilterItem value="Stable">Stable</FilterItem>
<FilterItem value="Experimental">Experimental</FilterItem>
<FilterItem value="Deprecated">Deprecated</FilterItem>
</Filter>
</Stack>
<Pagination page={1} total={74} />
</CollectionRow>
<CollectionView status="ready">
<DecorativeBox subtle height="25rem" />
</CollectionView>
<CollectionRow align="flex-end">
<Pagination page={1} total={74} />
</CollectionRow>
</Collection>
)
}
Filter group
Muted
Base
1 — 25 of 74
1 — 25 of 74
import {
Collection,
CollectionView,
Filter,
FilterItem,
Pagination,
Search,
CollectionRow,
} from '@vtex/shoreline'
import { DecorativeBox } from '../components/decorative-box'
export default function Example() {
return (
<Collection>
<CollectionRow>
<Search />
<Pagination page={1} total={74} />
</CollectionRow>
<CollectionRow>
<Filter label="Status">
<FilterItem value="Stable">Stable</FilterItem>
<FilterItem value="Experimental">Experimental</FilterItem>
<FilterItem value="Deprecated">Deprecated</FilterItem>
</Filter>
<Filter label="Status">
<FilterItem value="Stable">Stable</FilterItem>
<FilterItem value="Experimental">Experimental</FilterItem>
<FilterItem value="Deprecated">Deprecated</FilterItem>
</Filter>
<Filter label="Status">
<FilterItem value="Stable">Stable</FilterItem>
<FilterItem value="Experimental">Experimental</FilterItem>
<FilterItem value="Deprecated">Deprecated</FilterItem>
</Filter>
</CollectionRow>
<CollectionView status="ready">
<DecorativeBox subtle height="25rem" />
</CollectionView>
<CollectionRow align="flex-end">
<Pagination page={1} total={74} />
</CollectionRow>
</Collection>
)
}
Optional props
children
Component children
type
React.ReactNode
default
null