Skip to content

Props Reference

Type: string

Default: #588f58

The background color of the soccer pitch.

<SoccerLineUp color="#327d61" />

Type: "small" | "normal" | "big" | "responsive" | "fill"

Default: "normal"

Controls the dimensions of the pitch.

ValueWidthHeightNotes
"small"600px350pxFixed dimensions
"normal"900px525pxFixed dimensions
"big"1200px700pxFixed dimensions
"responsive"100%AutoMaintains 12:7 aspect ratio
"fill"100%100%Fills container
<SoccerLineUp size="responsive" />

Type: "lines" | "squares" | "circles" | undefined

Default: undefined

Adds a visual pattern overlay on the pitch grass.

<SoccerLineUp pattern="lines" />

Type: "horizontal" | "vertical"

Default: "horizontal"

Controls the pitch orientation.

ValueDescription
"horizontal"Landscape layout (default). Home team on the left, away team on the right
"vertical"Portrait layout. Home team at the bottom, away team at the top
<SoccerLineUp orientation="vertical" />

Type: Team | undefined

Default: undefined

Configuration for the home team. See Team Configuration for details.

const homeTeam: Team = {
squad: {
gk: { number: 1 },
df: [{ number: 2 }, { number: 3 }, { number: 4 }, { number: 5 }],
cm: [{ number: 6 }, { number: 8 }, { number: 10 }],
fw: [{ number: 7 }, { number: 9 }, { number: 11 }]
},
style: {
color: '#ffffff',
borderColor: '#c8102e'
}
};
<SoccerLineUp homeTeam={homeTeam} />

Type: Team | undefined

Default: undefined

Configuration for the away team. Works identically to homeTeam but positions players on the opposite side of the pitch.

const awayTeam: Team = {
squad: {
gk: { number: 1 },
df: [{ number: 2 }, { number: 3 }, { number: 4 }, { number: 5 }],
cm: [{ number: 6 }, { number: 8 }],
cam: [{ number: 10 }],
fw: [{ number: 9 }, { number: 11 }]
},
style: {
color: '#333333',
borderColor: '#ffffff'
}
};
<SoccerLineUp awayTeam={awayTeam} />