# KptPanel (kpt-panel) A panel with a header and optional collapsing. Import: `import { KptPanel } from '@konce-pt/angular';` ## Inputs / model - `header`: string - `toggleable`: boolean - shows the collapse button - `collapsed`: model (two-way) - `animated`: boolean (default true) - the collapse animation (CSS grid, pure CSS) - `animationDuration`: number (default 500) - animation time in ms - `collapseMotion`: `'spring' | 'fade' | 'none'` (default from `provideKptMotion`, else `spring`) - see "Collapse motion" - Header actions: the `[kptPanelActions]` projection. Content: ``. ## Example Content... ## Collapse motion - `spring` - the height opens on a soft spring, the content slides in from above and sharpens out of a blur; when collapsing, the content fades first and only then the section closes. The chevron turns on a spring. - `fade` - the height on the standard curve, the content cross-fades. - `none` - the state changes without motion. With no value it takes `collapse` from `provideKptMotion` (default `spring`). `animated: false`, `enabled: false` in the config and the system "reduce motion" setting always turn it off. `animationDuration` sets the time of every kind. Pure CSS: the kind sits in `data-motion` on the component root. ## Tokens The header `--kpt-color-surface-variant`; the border `--kpt-color-border`. ## Accessibility The toggle is a native button with `aria-expanded` and `aria-controls` pointing at the body. Its name says which panel it collapses - `panel.toggleNamed` ("Collapse / expand Settings") when there is a `header`, `panel.toggle` otherwise - so several panels on one page are told apart. A collapsed body is `inert` and `aria-hidden`. The header title is not a heading - add your own when the panel should appear in the document outline.