PHPackages                             levmyshkin/dreadmore - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. levmyshkin/dreadmore

ActiveDrupal-library[Utility &amp; Helpers](/categories/utility)

levmyshkin/dreadmore
====================

The plugin for collapsing and expanding long blocks of text. You can DISABLE it using CSS!

2.1.1(3y ago)07MITJavaScript

Since Aug 8Pushed 3y agoCompare

[ Source](https://github.com/levmyshkin/dreadmore)[ Packagist](https://packagist.org/packages/levmyshkin/dreadmore)[ Fund](https://www.buymeacoffee.com/DSekon)[ RSS](/packages/levmyshkin-dreadmore/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

[DReadMore by DSekon](https://dreadmore.dsekon.com "DReadMore by DSekon")
=========================================================================

[](#dreadmore-by-dsekon)

 [ ![Release version](https://camo.githubusercontent.com/0fc5a65c0154dbcc98645e9e1504f60f09eecd69792581b022e3beae40edfbcd/68747470733a2f2f62616467656e2e6e65742f6769746875622f72656c656173652f4453656b6f6e2f44526561644d6f7265) ](https://github.com/DSekon/DReadMore/releases)

 [![Buy Me A Coffee](https://camo.githubusercontent.com/b042e6e654016e6ea7a0702b29d0767dd9edf4d755ee8f6979c5139673118b22/68747470733a2f2f63646e2e6275796d6561636f666665652e636f6d2f627574746f6e732f76322f64656661756c742d626c75652e706e67)](https://www.buymeacoffee.com/DSekon)

#### Forked from  for using as drupal-library.

[](#forked-from-httpsgithubcomdsekondreadmore-for-using-as-drupal-library)

#### The plugin for collapsing and expanding long blocks of text. You can DISABLE it using CSS!

[](#the-plugin-for-collapsing-and-expanding-long-blocks-of-text-you-can-disable-it-using-css)

### [Demo](https://dreadmore.dsekon.com "Demo")

[](#demo)

Getting Started With DReadMore
------------------------------

[](#getting-started-with-dreadmore)

### Include Files To Website

[](#include-files-to-website)

After that we need to include DReadMore JS file to our website. In your html file:

```
>

    ...

    ...

```

### Add HTML Layout

[](#add-html-layout)

Now, we need to add basic DReadMore layout:

```

    Lorem ipsum, dolor sit amet consectetur adipisicing elit. Impedit recusandae quas eaque
    laudantiumquo, dolorem vitae quia cupiditate sit, exercitationem suscipit molestiae iste
    dolores eos facere mollitia voluptatibus nihil. Dicta ex blanditiis officiis beatae
    similique neque nostrum consequatur maiores quas!

Show more
```

### Add CSS Styles

[](#add-css-styles)

After that, we may need to set DReadMore min-height and overflow in your CSS file:

```
.dreadmore {
    min-height: 2px;
    overflow: hidden;
}

/* for a disabled toggler */
.dreadmore--disabled {
    display: none;
}
```

Set a **min-height** based on lines, you could do so in CSS: **1px - 1 line**

Documentation
-------------

[](#documentation)

### Options

[](#options)

Let's look on list of all available parameters:

ParameterTypeDefaultDescriptioninitialExpandbooleanfalseSet to **true** and the text will be expanded at the startisInitialExpandWhenUpdatebooleanfalseReturns in the original state specified in startOpen when the screen is resizedmoreTextstring'Show more'The text of the button when the collapsed textlessTextstring'Close'The text of the button when the expanded textExample:

```
const dreadmore = new DReadMore({
    initialExpand: true,
    isInitialExpandWhenUpdate: true,
    moreText: 'Show more',
    lessText: 'Up'
});
```

### Callbacks

[](#callbacks)

After that we need to include DReadMore JS file to our website. In your html file:

```
const dreadmore = new DReadMore({
    // beforeToggle called after a more or less link is clicked,
    // but before the block is collapsed or expanded
    beforeToggle: function($element, expanded) {
        console.log($element, expanded)
    },

    // afterToggle called after the block is collapsed or expanded
    afterToggle: function($element, expanded) {
        console.log($element, expanded)
    }
});
```

### Update

[](#update)

```
dreadmore.update();
```

### Destroy

[](#destroy)

If you really want to be that guy...

```
dreadmore.destroy();
```

### Disable

[](#disable)

Aaaaaand you can disable in CSS :D

```
.dreadmore {
    min-height: 0px;
}
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1379d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b36520942f79193ba42311edf66bce9654c126a2d6733a5b3a627a4a217229f?d=identicon)[levmyshkin](/maintainers/levmyshkin)

---

Top Contributors

[![DSekon](https://avatars.githubusercontent.com/u/26517397?v=4)](https://github.com/DSekon "DSekon (30 commits)")[![ivan829llc](https://avatars.githubusercontent.com/u/132590440?v=4)](https://github.com/ivan829llc "ivan829llc (2 commits)")

### Embed Badge

![Health badge](/badges/levmyshkin-dreadmore/health.svg)

```
[![Health](https://phpackages.com/badges/levmyshkin-dreadmore/health.svg)](https://phpackages.com/packages/levmyshkin-dreadmore)
```

###  Alternatives

[humanmade/hm-rewrite

HM\_Rewrite is a wrapper for the WordPress WP Rewrite system. http://hmn.md/wordpress-rewrite-rules-hm-core-style/

16115.9k](/packages/humanmade-hm-rewrite)[jayanka/patch-manager

A magento extension to maintain data patches

232.4k](/packages/jayanka-patch-manager)[tapp/filament-progress-bar-column

Add beautiful, color-coded progress bars to your Filament table columns. Perfect for inventory, tasks, storage, and any progress metrics without writing custom views.

124.5k](/packages/tapp-filament-progress-bar-column)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
