Collapsible
An interactive component which expands/collapses a panel.
Collapsible
@jayshiai/dubsui
Usage
Collapsible
component takes intitle
andshow
props.Children
ofCollapsible
component are rendered inside collapsible panel.title
prop is the title of the collapsible panel. It is a required prop. It acceptsReactNode
so it can be astring
or even aReact Component
.show
prop takes in number. It decides how many items of collapsible are shown in an uncollapsed state. Default value is0
. It is an optional prop. It can takenegative
values as well which mean that number of component will be hidden in uncollapsed state.
Interface for CollapsibleProps
interface CollapsibleProps {
children: React.ReactNode;
title: React.ReactNode;
show?: number;
}
Customizable Design
More granular components provide you with more control over the design of the Collapsible
component. You can customize the design of the Collapsible
component by using the following sub-components:
Choose the flavour of dubsui
@jayshiai/dubsui
- Style of every sub-component of the Avatar component can be customized using the
className
prop. - Pass in a
CSS class
or useTailwind CSS
utility classes to style the Avatar component.