Collapsible
An interactive component which expands/collapses a panel.
Collapsible
@jayshiai/dubsui
Usage
Collapsiblecomponent takes intitleandshowprops.ChildrenofCollapsiblecomponent are rendered inside collapsible panel.titleprop is the title of the collapsible panel. It is a required prop. It acceptsReactNodeso it can be astringor even aReact Component.showprop 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 takenegativevalues 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
classNameprop. - Pass in a
CSS classor useTailwind CSSutility classes to style the Avatar component.