1.0.5 • Published 8 months ago

@markai/mark-collapse v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

<mark-collapse> Published on npm

  • This is simple web component built using the lit.dev library.
  • It provides a simple way to create collapsible content sections.
  • Users can toggle the visibility of the content by interacting with the component.

Installation

npm i @markai/mark-collapse
yarn add @markai/mark-collapse

Usage

Example of mark-collapse usage patten.

  1. Import the mark-collapse element:
import '@markai/mark-collapse';
  1. Add the mark-collapse element to your HTML:
<mark-collapse open>
  <p>This content can be collapsed and expanded.</p>
</mark-collapse>

Properties

nameTypeDescription
openbooleanDetermines whether the content is currently open (visible) or closed (hidden). By default, it is set to false, meaning the content is initially closed.

Methods

nameReturnDescription
togglevoidallows you to programmatically toggle the visibility of the content. Call this method to change the state of the open property.

Slots

nameDescription
defaultto insert content that you want to collapse. Place your content within the <slot></slot> tags inside the mark-collapse element.

CSS Custom Properties

NameDefaultDescription
--mark-collapse-transition-duration0.5sThe duration of the collapse/expand animation.
--mark-collapse-transition-timing0.5sThe timing function for the collapse/expand animation.
1.0.5

8 months ago

1.0.4

8 months ago

1.0.4-trigger.1

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.1-refactor.1

8 months ago

1.0.0

8 months ago