Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lion/collapsible

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lion/collapsible

This component is a combination of a button (the invoker), a chunk of extra content.

  • 0.9.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Collapsible >> Overview ||10

A combination of a button (the invoker) and a chunk of 'extra content'. This web component can be extended with an animation to disclose the extra content. There are two slots available respectively; invoker to specify the collapsible's invoker and content for the extra content of the collapsible.

import { html } from '@mdjs/mdjs-preview';
import '@lion/collapsible/define';
export const main = () => html`
  <lion-collapsible>
    <button slot="invoker">More about cars</button>
    <div slot="content">
      Most definitions of cars say that they run primarily on roads, seat one to eight people, have
      four tires, and mainly transport people rather than goods.
    </div>
  </lion-collapsible>
`;

Features

  • Use opened attribute or toggle() method to render default open.
  • invoker slot can be custom template e.g. our button or native button with custom styling.
  • Observe the state with the help of @opened-changed event.
  • show() and hide() are helper methods to hide or show the content from outside.

Installation

npm i --save @lion/collapsible
import { LionCollapsible } from '@lion/collapsible';
// or
import '@lion/collapsible/define';

Keywords

FAQs

Package last updated on 08 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc