Twitter2.3k

Collapsible

An interactive component which expands/collapses a panel.

@peduarte starred 3 repositories

@radix-ui/primitives
@radix-ui/colors
@stitches/react

Installation

ng g @spartan-ng/cli:ui collapsible

Usage

import { HlmCollapsibleImports } from '@spartan-ng/helm/collapsible';
<hlm-collapsible>
  <button hlmCollapsibleTrigger>Can I use this in my project?</button>
  <hlm-collapsible-content> Yes. Free to use for personal and commercial projects. No attribution required. </hlm-collapsible-content>
</hlm-collapsible>

Examples

Animated

You can use the data-state and Tailwind classes to control the animation of the collapsible.

@peduarte starred 3 repositories

@radix-ui/primitives
@radix-ui/colors
@stitches/react

Brain API

BrnCollapsibleContent

Selector: [brnCollapsibleContent],brn-collapsible-content

Inputs

PropTypeDefaultDescription
id string | null | undefined - The id of the collapsible content element.

BrnCollapsibleTrigger

Selector: button[brnCollapsibleTrigger]

Inputs

PropTypeDefaultDescription
type 'button' | 'submit' | 'reset' button -

BrnCollapsible

Selector: [brnCollapsible],brn-collapsible

Inputs

PropTypeDefaultDescription
disabled boolean false The disabled state of the collapsible component.
expanded boolean false The expanded or collapsed state of the collapsible component.

Outputs

PropTypeDefaultDescription
expandedChanged boolean false The expanded or collapsed state of the collapsible component.

Helm API

HlmCollapsibleContent

Selector: [hlmCollapsibleContent],hlm-collapsible-content

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmCollapsibleTrigger

Selector: button[hlmCollapsibleTrigger]

HlmCollapsible

Selector: [hlmCollapsible],hlm-collapsible

Combobox Checkbox