Filters and leagues column
Let visitors narrow the Livescore list by team, competition or country, and add a column of competitions beside the matches.
The Livescore can help visitors find their match in a long day: a search field that narrows the list as they type, a Filters button to pick a country or a competition, and a column of competitions beside the matches, on the left or on the right, as on most score sites. Each part has its own switch. The search field is on in new configurations; everything else is off until you turn it on.
The status stays in the tabs
The Today, Live, Upcoming, Finished and My matches tabs already filter by status, so there is no separate status filter. The search, the menus and the column filter inside the tab that is open, and while a filter is on, the tab counters count only what it lets through. On Today every status tab gets its filtered count; on another tab only that tab's count is known, so the others hide their number until the filter is cleared.
Filters are part of what the visitor is looking at, like the open tab: they are not saved, they do not change the page address, and each widget on a page has its own.
Search in the list
Plans
Search in list in Livescore navigation items adds a search field to the Livescore toolbar. It is on in new configurations: the ones you start in the playground now and, after a later update of the admin, the ones you create in the SoccersAPI admin. A configuration saved before stays as it is, with the field off until you tick it, and saving it again does not turn it on.
The field sits at the end of the row of tabs, so the toolbar keeps its height:
- When the row has room, typically a wide widget whose tabs have a row of their own, the field stays at the end of the tabs and says which tab it searches, for example Search in Today.
- When it does not, on phones, medium widths and toolbars that put the tabs, the dates and the icons in one row, it is an icon (a list with a magnifying glass) at the end of the tabs. A click opens the field over the tabs, with the open tab in front of it (Today ▾): visitors can switch tab from there without closing the field.
- When visitors leave the field with a search on (they tap the list, press Esc or move on with the keyboard), the tabs come back and the search stays as a chip, for example “madrid” with its own × (if the narrowed tabs now leave room, the field stays at the end of the row instead). The chip opens the field again; its × clears everything.
As visitors type, the list keeps only the matches whose home team, away team, competition or country contains what they typed:
- accents and capitals do not matter (atletico finds Atlético, besiktas finds Beşiktaş, bodo finds Bodø), and each word can match a different name (japan niigata);
- the matching words are highlighted in the list, and every competition with a match opens;
- the field says how many matches remain, for example 5 of 1,514, with Clear next to it (on phones just 5/1,514, and nothing on the narrowest), and the tab counters count only those matches. Screen readers hear the count once the visitor stops typing.
It searches the list the widget has already loaded, so it costs no extra requests and works on every plan. Names are matched as the SoccersAPI data spells them in the widget's language.
The search icon of the toolbar stays: it opens the search dialog, which finds any team, competition or player, also one that does not play today. When the list has no match, the empty list offers Search all teams & leagues, which opens the dialog with what the visitor typed (so does Enter in the field). If you turned Action · Search off, the search in the list works on its own and does not offer it.
The Filters button
Plans
Country filter and League filter (in Country and league filters, in the plan column of the configurator) add a Filters button next to the search field. It opens one list with what plays in the open tab: All matches, your featured competitions, the competitions with most live matches, and every country with its competitions, each with the number of matches and how many are live, plus a box to find a name. Country filter lets visitors pick a whole country, League filter a competition; choosing a competition also chooses its country. The button then shows the choice, for example J.League 2, with its own ×.
On phones and narrow widgets (560 px or less) the button opens a panel from the bottom of the widget with the same list. Like the search dialog, the panel covers only the widget: a narrow widget in the sidebar of a desktop page does not open it across the whole page.
Leagues column
Plans
Leagues column (in the plan column of the configurator) puts the competitions beside the matches, Left or Right. In Arabic and Persian the whole layout reads from right to left, and the column swaps sides with it. Column width goes from 240 to 300 px (264 by default).
With Floating cards as the navigation mode, a column set to Right shows on the left (on the right in Arabic and Persian): the floating cards stack on the right of the widget and would cover it. Your choice is kept, so the column goes back to the right with any other navigation mode, and the configurator says so under Leagues column. The Leagues panel of narrower widgets still opens on the side you chose.
The column needs a widget at least 900 px wide. With a widget Scale above
1×, the column and that minimum grow with it (at 1.25× the column needs a
1,125 px widget). In a narrower widget it becomes
a Leagues button in the toolbar that opens the same list in a panel on
the column's side of the widget. The column stays in view while visitors scroll the matches
and scrolls on its own. If your page has a fixed header, set the CSS variable
--ls-leagues-column-sticky-top to its height so the column stops under it.
Column navigation decides what a click in the column does:
- By feed (filters the matches), the default: All matches, the featured competitions that play in the open tab, the competitions with most live matches, and every country with matches, A to Z, each with its competitions. A click filters the matches, exactly like the Filters button, and the toolbar shows the choice. While the column is in view it replaces the Filters list; in a narrower widget Filters opens the column's panel. The search in the list also narrows the column.
- Full list (opens the league): every competition, with your featured competitions first, then international competitions and countries. A badge shows how many matches each one has in the open tab. A click opens the competition the way your navigation mode says: in the window over the widget, as a floating card, inside the widget (the column stays and marks the open competition) or on your own page with Dynamic Pages. With None (no entity links) nothing could open, so the column works By feed.
Turn them off
Untick Search in list (in Livescore navigation items; it is ticked in new configurations), Country filter and League filter, or set Leagues column to Off. A filter that a visitor had chosen goes away with its switch.