Skip to content

Controlled Disclosure

This is one of the clearest places where Litsx authoring feels lighter.

  • one component supports open, defaultOpen, and onOpenChange
  • useControlledState(...) keeps the wiring local to the render function
  • the public API still looks like a normal design-system primitive

What To Notice

  • the authored code stays in one function instead of splitting state semantics across class fields
  • the controlled and uncontrolled paths share the same render logic
  • this is the kind of reusable component API where conventions matter more than raw LOC

Next