-
The lit docs mention the possibility of 'controller directives'--directives that are themselves controllers. Is there an example of how this works in practice? I'm skimming the relevant docs, and I don't understand how a directive could implement |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
I don't think we have an example in the docs site but the lit/packages/labs/motion/src/animate.ts Lines 227 to 240 in c28cb6e |
Beta Was this translation helpful? Give feedback.
-
I'm interested in the opposite as well - controllers that surface directives. Could this be used to implement ui patterns like accessible listboxes without strong opinions about DOM structure? |
Beta Was this translation helpful? Give feedback.
I don't think we have an example in the docs site but the
@lit-labs/motion
package'sanimate
directive is written as a controller directive.lit/packages/labs/motion/src/animate.ts
Lines 227 to 240 in c28cb6e