Use and format the gallery view in a SharePoint list
Short answer: a gallery view shows each list item as a card instead of a row. You create it as a new view, then change the look of the cards with view formatting. Open the view menu, choose Format current view, switch the layout to Gallery, and paste a small piece of JSON into the formatter box. The cards then change color from the data in each item.
When cards help
A grid of rows is good for sorting and filtering. Cards are good when people want to scan items fast, such as a set of open requests, a team board or a list of assets. Each card shows a few fields at a glance.
Our advice, not a Microsoft rule: use a gallery view as a second view next to your normal list view. Keep the normal view for editing many rows. Use the gallery for looking.
Step 1. Check your list first
Cards work best when the list is small and tidy. Before you start:
- Open your list at https://www.microsoft365.com and go to Lists, or open the list in its SharePoint site.
- Check that the Title column holds something short and clear. The Title column is required by default. Our advice, not a Microsoft rule: rename it to something that fits, such as Request or Asset, or turn off Require in the column settings if you do not need it.
- If you plan to color cards by status, make Status a Choice column with numbered choices: 1 Open, 2 In progress, 3 Done. The number keeps your order. A Choice column sorts by its text, so the number is there to hold your order.
- Set a default status, so a blank status does not hide an item from a status view.
Step 2. Create the gallery view
Microsoft's page "Create, change, or delete a view of a list or library" lists Gallery as one of the "Show as" options. It says to "select List, Calendar, or Gallery for the type of view you want to create." It also says: "The Gallery view option is only available in SharePoint Online."
Steps, with exact names that may differ on your screen:
- In your list, open the view menu at the top right.
- Choose the option to create a new view.
- Enter a name, such as "Cards".
- Under Show as, choose Gallery.
- Save the view.
You now see each item as a card.
Step 3. Choose what the card shows
Our advice, not a Microsoft rule, on which fields appear on gallery cards: keep the cards short. Make the Title clear, then decide on two or three other fields that help someone decide what to do next, such as status, owner and due date.
To control fields in a view, Microsoft says you can "add or remove columns, add "sort" or "filter" criteria, configure folders, and more." Use the Edit current view option in the view menu and look at the column list. Exact names may differ on your screen.
Also keep in mind a limit Microsoft states for any view: "The maximum number of items in a view is 5000." If your list is large, add a filter to the gallery view so it shows only what people need.
Step 4. Add color with view formatting
View formatting changes how items look, not what is stored. Microsoft says: "View formatting does not change the data in list items; it only changes how they're displayed to users who browse the list." It also says: "Anyone who can create and manage views in a list can use view formatting to configure how views are displayed."
Microsoft's page "Use view formatting to customize SharePoint" gives the start: "To open the view formatting pane, open the view dropdown and choose Format current view." It then says: "To format cards in 'Gallery' layout, select 'Gallery' in 'Choose layout' dropdown in the formatting pane and use the formatter property."
So the steps are:
- Open your Cards view.
- Open the view dropdown and choose Format current view.
- In Choose layout, select Gallery.
- Paste your JSON into the box.
- Preview it, then save.
A small sample to start from
The sample below follows Microsoft's gallery example: a schema line, a card height and width, and a formatter. It writes the Title on each card and colors the text by status. Replace the choice text so it matches your column exactly, including the number prefix.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json",
"height": "120",
"width": "250",
"hideSelection": true,
"formatter": {
"elmType": "div",
"txtContent": "[$Title]",
"style": {
"padding": "8px",
"color": "=if([$Status] == '3 Done', '#107c10', if([$Status] == '1 Open', '#a4262c', '#323130'))"
}
}
}
Our advice, not a Microsoft rule: start with something this small, save it, and look at the result before you add more. If the card turns blank, remove the last thing you added.
What to know about the names inside the JSON:
- Microsoft's column formatting page says a field is referenced with the "[$FieldName]" style, and that "FieldName is assumed to be the internal name of the field."
- It also says: "If you have spaces in the field name, those are defined as _x0020_. For example, a field named "Due Date" should be referenced as $Due_x0020_Date."
- The same page shows conditional formatting with an Excel-style expression such as "=if(@currentField == 'Done', ...". Your formatter can use the same style.
Source for the card format: "Gallery layout customizations". Microsoft says the Gallery formatter uses "the same syntax used in Column Formatting", so the field rules above apply inside formatter. Use the Preview before you save.
Color a card for late items
Microsoft's column page shows a date example: "color": "=if([$DueDate] <= @now, '#ff0000', '')". It explains that "@now" resolves to the current date and time "evaluated when the user loads the list view."
Our advice, not a Microsoft rule: add a Yes/No column called Done and set its default value. A due or overdue color should check both the date and the Done column, so old finished items do not stay red. For the same idea on rows, see "Turn overdue rows red in a SharePoint list".
Let people find the gallery view
Our advice, not a Microsoft rule: name views by what they are for, such as "Cards" for the gallery and "All items" for the table. Make the view you want people to see first the default.
Remember that a view is not security. Everyone who has access to the list can switch to another view and see the items. If some people must not see some items, use permissions. See "Let each person see only their own items in a SharePoint list".
What to avoid
- Do not expect gallery formatting to change stored data. It only changes how cards look.
- Do not put ten fields on one card. Cards that are too full are harder to read than rows.
- Do not copy JSON that uses field names you do not have. A wrong internal name gives a blank or broken card.
- Do not use the numbered choice text without the number. The filter and the JSON must match the choice text, such as 1 Open.
- If you filter the gallery view for blank values or use "is not equal to", our advice, not a Microsoft rule: set blank and "is not equal to" filters in the classic view editor too.
- Do not use [Today] or [Me] in a view filter in the new view panel. Microsoft says those need the classic view editor (Edit current view, then Filters).
- Do not format a huge list without a filter. Remember the 5000 item limit for a view.
- Do not rely on Gallery in an older SharePoint setup. Microsoft says the Gallery view option is only in SharePoint Online.
When to get help
You can build all of this yourself in Microsoft 365. If you would rather have it built and tested for your team, I do that. A tracker like this is a fixed price: $5,000 for one, built in 2 weeks. See "What a SharePoint tracker costs to build". Bring one example of the problem to a free call.
I am Al Davies. I run 250 High Street LLC and build SharePoint trackers and Power Automate flows for operations teams. I work remotely. The first call is free, and I will not try to sell you anything.
See trackers I built: Tools I built
FAQ
Where is the option to make a gallery view?
Microsoft lists Gallery as a "Show as" choice when you create a new view. The exact menu names may differ on your screen.
Does formatting change my list data?
No. Microsoft says view formatting "does not change the data in list items; it only changes how they're displayed."
Who can format a view?
Microsoft says anyone who can create and manage views in a list can use view formatting. If you cannot see Format current view, ask your site owner.
Why is my card blank after I paste JSON?
Our advice, not a Microsoft rule: check the internal field names and the choice text, including the number prefix. Remove lines until the card shows again, then add them back one at a time.
Is a gallery view a way to hide items from some people?
No. A view is not security. Use permissions if some items must stay private.
Sources
- Microsoft Support, Create, change, or delete a view of a list or library
- Microsoft Learn, Use view formatting to customize SharePoint
- Microsoft Learn, Use column formatting to customize SharePoint
- Microsoft Learn, Gallery layout customizations