Disclosure. Native expandable content for details and FAQs.
- Article structure
- Interactive
- Stability · Initial
- :::postkit-disclosure
What makes Postkit portable?
Its authored component contract is independent from the framework adapter and presentation layer.
Usage.
<Disclosure summary="What makes Postkit portable?" open>
Its authored component contract is independent from the framework adapter and presentation layer.
</Disclosure>Props. Always in step with the code.
| Prop | Type | Default | Description |
|---|---|---|---|
| summaryRequired | string | None | The always-visible disclosure label. |
| open | boolean | false | Whether the disclosure starts expanded. |
| Appearance | |||
| size | "sm" | "md" | "lg" | "md" | The component density and type scale. |
| variant | "outline" | "subtle" | "plain" | "subtle" | The component visual treatment. |
Every component also takes unstyled and the part-styling props. Change a default for your whole site with defaults in createPostkit. Part styles
Anatomy. Every part is yours to restyle.
Every part
- root
- summary
- indicator
- content
Renderers. One component, everywhere you publish.
- Headless @postkit/reactSupported
- Chakra @postkit/chakraSupported
- Email @postkit/emailAs text
- Astro @postkit/astroStatic
- Web components @postkit/elementsPlanned