10

Main question:

Are Container components usable in the Lightning App Builder where I can put child components on it via point-and-click possible at all?

I'm looking for something like the standard Tabs component. Can we create a container component like that?

If this is currently not supported:

  • is this on the roadmap?
  • what is the correct name of that feature? (it might be called or related to the terms 'placeholders' or 'regions' but this is unsure, and more feedback is required)
  • for which release this feature is targeted?
  • is there a pilot program?

If this is currently supported:

Is there any example with source code or detailed documentation on how to create a Lightning Component, which acts as a container for sub components in the Lightning App Builder?

Why do I need this?

I need to create collapsible sections which can also be made invisible by conditions. The content needs to be designable in the App Builder. (Edit: this was only my first need. In the meantime I figured dozens of meaningful missing usecases like better Tabs, better and more flexible Layouts and nested sub-Layouts all kinds of Panels and so on. Don't want to wait on Salesforce providing all that for me)

If possible (which seems unlikely, but I haven't given up yet) I just need a simple example, the rest I can do on my own.

4
  • Is this for a lightning page Uwe? If so, this is native functionality with SLDS that shouldn't require a componet, but instead more of a template.
    – crmprogdev
    Dec 25, 2016 at 13:14
  • @crmprogdev yes and no: yes, let's assume the outer container is a Flexipage in LEX. And no, I'm looking only for an answer about if we actually are able create a Lightning Component like the Tabs Component or not. I wasn't able to find anything in the docs, so my assumption: the Tabs-compo is beyond what we can do right now. But I'm not sure about it and if it's not possible today, I'm pretty sure it's on the roadmap. Bottom-line: I need to get more details to plan ahead appropriately.
    – Uwe Heim
    Dec 25, 2016 at 16:48
  • @UweHeim I think it's better to reach out to the Lightning Team via Partner Community to get more details about it.
    – Praveen
    Dec 25, 2016 at 17:38
  • 1
    @Praveen thanks for your suggestion. I've posted this question now additionally on the Partner Community. There on the Groups "Lightning and Components" and "Lightning Components - Trailblazers" with backlinks to here.
    – Uwe Heim
    Dec 28, 2016 at 15:46

3 Answers 3

4
+50

you're right that this isn't supported yet, and there's no public scheduled roadmap for this (2016-12-29). That said, the use case is clear and obviously useful to a lot of people.

If you've seen John Belo's Advanced Lightning Apps webinar he suggests a pattern that might help you though.

Here's what I would do. I acknowledge that this is not the same as the nice interface you're looking for. Create a custom metadata type for your ComponentConfigGroup. Then, another custom metadata type for ComponentConfigItems with a metadata relationship to the group.

I'd define one "group" per page you want to use your component on, and it'd have n "items", which each define their content and the conditions. Then, in Lightning App Builder, you drag over one global component and type in the DevName of your group metadata record.

On the roadmap (I've heard pilot in summer, safe harbor) is some level of dynamic function added to the design/attributes pane in app builder, which might let you display all your groups for the user to select.

0
3

With Winter 18 there are now a couple of features that could cover some of your use cases:

  • You can now create your own Custom Page Templates. Custom Page Templates are essentially Lightning Components with some additional metadata, so you could for example implement regions that are collapsible.

  • With the Dynamic Lightning Pages feature, you can define visibility rules on individual components.

3
  • Hey Kristian, it's been two years since your response. Are you able to confirm whether container components (like the standard Tabs component) are currently supported? I desperately need to set one up. Thanks.
    – M H
    Oct 14, 2019 at 8:33
  • I'm sorry, custom container components is still not supported.
    – Kristian
    Oct 15, 2019 at 16:27
  • No worries, thanks for letting me know
    – M H
    Oct 15, 2019 at 21:38
2

I've got some feedback from Salesforce:

As we all guessed right, this feature is not available yet. (At least in Winter'17 release)

It seems to be on the roadmap to support custom "container" components similar to the Tabs component that allow you to nest components. The standard Tabs component is currently the only option now.

I was not able to find any ETA or timeframe on this feature.

I would be very happy, if somebody from Salesforce could verify, correct or extend this information. In the meantime I hope this answer will save others looking for it the hours of research I've spent to come to that conclusion. I'm sure not to be alone with this need.

Btw. The bounty is still open for 3 days (writing this on 2016-12-29) and I will happily provide it to anyone who comes with an better answer.

1
  • If you guys have an idea posted for the same, we can upvote ? Jul 31, 2017 at 5:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .