Layout

Collapse

@xui/collapse

Animates its content open and closed.

Install

pnpm add @xui/collapse

Add the barrel to a standalone component's imports:

import { XuiCollapseImports } from '@xui/collapse';

@Component({
  imports: [XuiCollapseImports],
  // …
})

Examples

Default

Loading preview…

Keep children mounted

Loading preview…

API

XuiCollapse

componentxui-collapse

Animates its content open and closed.

Inputs

NameTypeDefaultclassClassValueThe user-defined classes. Merged last so they win over the base classes.''opentwo-waybooleanWhether the content is expanded. Two-way bindable with [(open)].falsekeepChildrenMountedbooleanKeep the content in the DOM while closed.falsedurationnumberTransition length in milliseconds.200

Outputs

NameTypetransitionEndbooleanEmits once the open or close transition has finished.

Source

libs/ui/collapse/xui

xUI 2.0.0 — Apache 2.0 licensed. Built with Angular and Tailwind CSS.