Skip to main content

Repeated Bricks

A brick used as a repeater item is just a normal brick.

It receives also the index on the props, so that it may conditionally render based on its position in respect to the items array.

Before v3.5.0 you needed to spread props on its root element in order for it to be correctly focusable in the Admin interface. This is no more needed and it is better not to do it to avoid invalid attributes on DOM elements.


const Badge: types.Brick<BadgeProps> = ({
}) => {
return (
I am the item #{index}.
renderBlock={({ children }) => <p>{children}</p>}>

Badge.schema = {

export default Badge