# @magmalabs/spreadsheet

> A spreadsheet view_component for your Rails app

Latest version **2.0.0** (published 2026-07-07) · 0 weekly downloads

## Install

```sh
npm install @magmalabs/spreadsheet
pnpm add @magmalabs/spreadsheet
yarn add @magmalabs/spreadsheet
bun add @magmalabs/spreadsheet
```

## Health

**Score 45/100 (D)** — status: active.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2026-07-07 |
| First published | 2021-01-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 176.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ccarruitero, edman193 |

## Links

- npm: https://www.npmjs.com/package/@magmalabs/spreadsheet
- npm.io page: https://npm.io/package/@magmalabs/spreadsheet

## Dependencies (10)

- [mark.js](https://npm.io/package/mark.js.md) ^8.11.1
- [cleave.js](https://npm.io/package/cleave.js.md) ^1.6.0
- [hotkeys-js](https://npm.io/package/hotkeys-js.md) ^3.8.1
- [sortablejs](https://npm.io/package/sortablejs.md) ^1.12.0
- [cable_ready](https://npm.io/package/cable_ready.md) ^5.0.6
- [tailwindcss](https://npm.io/package/tailwindcss.md) ^1.9.5
- [stimulus_reflex](https://npm.io/package/stimulus_reflex.md) ^3.5.5
- [@primer/octicons](https://npm.io/package/@primer/octicons.md) ^11.2.0
- [@hotwired/stimulus](https://npm.io/package/@hotwired/stimulus.md) ^3.2.2
- [@rails/actioncable](https://npm.io/package/@rails/actioncable.md) ^6.0.0

## Recent versions

- 2.0.0 (latest) — 2026-07-07
- 1.0.0-alpha — 2023-10-02
- 0.3.6 — 2023-10-02
- 0.3.5 — 2021-05-13
- 0.3.4 — 2021-05-12
- 0.3.3 — 2021-04-27
- 0.3.2 — 2021-04-27
- 0.3.1 — 2021-03-18
- 0.3.0 — 2021-03-10
- 0.2.1 — 2021-02-10
- 0.2.0 — 2021-02-08
- 0.1.0 — 2021-01-07

## README

# Spreadsheet
A spreadsheet view_component for your Rails app

## Installation
Add this line to your application's Gemfile:

```ruby
gem 'spreadsheet', github: 'magma-labs/spreadsheet'
```

And then execute:
```bash
$ bundle
```

Or install it yourself as:
```bash
$ gem install spreadsheet
```

Then run the installation task
```bash
$ rake spreadsheet:install
```

> **_NOTE:_** Spreadsheet's ViewComponents use [shoelace](https://shoelace.style/) and [tailwind](https://tailwindcss.com/) in templates,
but for now these packages aren't included with the installation task so you will
need to install manually

## Usage

After install you can use Spreadsheet's ViewComponents in your templates

```haml
  = render Spreadsheet::Cell.new(id: 'cell-id', value: 'A Spreadsheet Cell')
```

Most components accept the following options:
- `classnames`: For agregate css classes to use with your component
- `colspan`: For define colspan to be applied in a component
- `component_controller`: For use a custom stimulus controller with a component
- `extra_data`: For extend default dataset added in the component template

## Development

### Setup project locally
In development, when editing js files you will need to [link your local repository](https://classic.yarnpkg.com/en/docs/cli/link/)
and run [webpack-dev-server script from `webpacker`](https://github.com/rails/webpacker#development) in your rails application

In brief, the process is 2 steps:
* Run `yarn link` in this directory.
* Run `yarn link "spreadsheet"` in the project that has the dependency.

## Contributing
Bug reports and pull requests are welcome on GitHub at [https://github.com/magma-labs/spreadsheet](https://github.com/magma-labs/spreadsheet).

## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

---
_Source: https://npm.io/package/@magmalabs/spreadsheet · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
