LowCodeStacks™
Sign in

NewPower Apps · canvas componentNavigation and layout✓ Tested in StudioMIT License

Tree view

Folders, categories or an org chart as a tree that opens and closes, from one flat table, in one gallery. Load children only when a node opens, mark the selected node, and save which nodes were open.

Name in Studio
lcsTreeView
Version
0.2.0
Properties
18 inputs · 4 outputs · 3 events · 4 actions
Sign in to copy

Free with an account

No ratings yet

Sign in to copy

Variations

As it is when you paste it, with every input at its default.

Files

Open: docs

Formulas on this screen

Set the same ones in Studio to try it the same way; there, each Notify shows its event in a banner, which this preview leaves out so nothing covers the component. The instance names are the ones Studio gives the first copy on a screen.

  • Screen1.OnVisible = ClearCollect(colNodes, {Key: "docs", ParentKey: "", Label: "Documents", Icon: "Folder", HasChildren: true}, {Key: "plans", ParentKey: "docs", Label: "Plans", Icon: "Folder", HasChildren: true}, {Key: "q3", ParentKey: "plans", Label: "Q3 plan.docx", Icon: "Document", HasChildren: false}, {Key: "q4", ParentKey: "plans", Label: "Q4 plan.docx", Icon: "Document", HasChildren: false}, {Key: "budget", ParentKey: "docs", Label: "Budget.xlsx", Icon: "Document", HasChildren: false}, {Key: "images", ParentKey: "", Label: "Images", Icon: "Folder", HasChildren: true}, {Key: "logo", ParentKey: "images", Label: "Logo.png", Icon: "Document", HasChildren: false}, {Key: "archive", ParentKey: "", Label: "Archive", Icon: "Folder", HasChildren: true})

  • lcsTreeView_1.Nodes = colNodes

  • lcsTreeView_1.OnNodeSelect = Notify("Open " & LookUp(colNodes, Key = NodeKey).Label)

  • lcsTreeView_1.OnExpand = If(NodeKey = "archive" && IsEmpty(Filter(colNodes, ParentKey = "archive")), Collect(colNodes, {Key: "a2025", ParentKey: "archive", Label: "2025", Icon: "Folder", HasChildren: false}, {Key: "a2024", ParentKey: "archive", Label: "2024", Icon: "Folder", HasChildren: false}))

  • Label1.Text = "Open: " & lcsTreeView_1.ExpandedKeys

A web replica that behaves as the component does in Power Apps. In Studio it uses Microsoft's controls, which can look slightly different.

Add it in five steps

  1. In Power Apps Studio, open Settings > Updates and check that Modern controls and themes and Enhanced component properties are on.
  2. Open the Components tab in the tree view and select New component.
  3. Select an empty part of Studio, so the new component isn't selected.
  4. Copy the YAML on this page and press Ctrl+V. lcsTreeView appears with all its properties.
  5. On a screen, insert it from Insert > Custom > lcsTreeView.

What it needs

  • No premium licence: standard controls, no connectors
  • Modern controls and themes: on
  • Enhanced component properties: on
  • Tested in Power Apps Studio 3.26094.9 on October 11, 2026
  • Version 0.2.0

Properties (29)

Read from the component's own YAML, so they always match what you paste.

Inputs
PropertyKindTypeDefault
Nodes

Every node as one flat table: Key, ParentKey (blank for the top level), Label, Icon (a Fluent icon name, such as Folder) and HasChildren (true when it has children you load later).

InputTableTable( {Key: "docs", ParentKey: "", Label: "Documents", Icon: "Folder", HasChildren: true}, {Key: "plans", ParentKey: "docs", Label: "Plans", Icon: "Folder", HasChildren: true}, {Key: "q3", ParentKey: "plans", Label: "Q3 plan.docx", Icon: "Document", HasChildren: false}, {Key: "q4", ParentKey: "plans", Label: "Q4 plan.docx", Icon: "Document", HasChildren: false}, {Key: "budget", ParentKey: "docs", Label: "Budget.xlsx", Icon: "Document", HasChildren: false}, {Key: "images", ParentKey: "", Label: "Images", Icon: "Folder", HasChildren: true}, {Key: "logo", ParentKey: "images", Label: "Logo.png", Icon: "Document", HasChildren: false}, {Key: "archive", ParentKey: "", Label: "Archive", Icon: "Folder", HasChildren: true} )
DefaultExpandedKeys

Keys of the nodes open when the screen loads, separated by commas.

InputText"docs"
CurrentKey

The Key of the node to mark as selected, from your app. Leave it blank and the tree marks the node last selected.

InputText""
Title

The heading above the tree.

InputText"Files"
ShowTitle

Shows the heading.

InputBooleantrue
ShowIcons

Shows each node's icon: folders in amber, everything else in your colour.

InputBooleantrue

Guide

Use lcsTreeView for anything nested: document folders, product categories, teams and their people, a site's pages. Power Apps has no tree control, and the usual workaround nests galleries inside galleries, which is slow and stops at two levels. This component:

  • Draws the whole tree in one gallery, from one flat table: each node names its ParentKey.
  • Reads at a glance: a card with a title, thin guide lines that join each level to its parent, folders in amber and files in your colour, and how many items each folder holds.
  • Opens and closes nodes with a chevron.
  • Loads children only when needed: mark a node HasChildren: true without giving its children, and load them in OnExpand(NodeKey). The tree shows them as soon as they arrive.
  • Marks the selected node (a tint, a filled icon and bold text) and runs OnNodeSelect(NodeKey).
  • Remembers what's open as ExpandedKeys, so you can save it and open the same nodes next time.
  • Goes up to five levels deep, with your AccentColor, a Dark theme and two looks: Standard (a soft highlight for the selected node) and Premium (a solid pill in your colour and a soft shadow).

Did it work for you?

No ratings yet.Nobody has said it worked in their app yet.

Sign in to rate it or to say it worked in your app.

Comments

  1. LowCodeStacks teamPinned

    Welcome! A tip: ExpandAll() opens only nodes whose children are already in Nodes. It doesn't run OnExpand, so it won't load children that aren't loaded yet.

    What are you showing in it: folders, categories, an org chart? Tell us how deep your tree goes (it shows up to five levels) and ask anything here.

Sign in to comment or reply. Comments show under a display name you choose, never your email.