# @wmfs/cardscript-to-quasar

> Produces HTML with Quasar-markup from Cardscript JSON

Latest version **1.272.0** (published 2026-10-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @wmfs/cardscript-to-quasar
pnpm add @wmfs/cardscript-to-quasar
yarn add @wmfs/cardscript-to-quasar
bun add @wmfs/cardscript-to-quasar
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

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

## Facts

| | |
|---|---|
| Version | 1.272.0 |
| Published | 2026-10-30 |
| First published | 2019-01-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 378.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | West Midlands Fire Service |
| Maintainers | wmfsbot |
| Keywords | tymly, cardscript |

## Links

- npm: https://www.npmjs.com/package/@wmfs/cardscript-to-quasar
- Repository: https://github.com/wmfs/cardscript-to-quasar
- Homepage: https://github.com/wmfs/cardscript-to-quasar#readme
- Issues: https://github.com/wmfs/cardscript-to-quasar/issues
- npm.io page: https://npm.io/package/@wmfs/cardscript-to-quasar

## Dependencies (2)

- [dottie](https://npm.io/package/dottie.md) 2.0.7
- [lodash](https://npm.io/package/lodash.md) 4.18.1

## Alternatives

- [monaco-yaml](https://npm.io/package/monaco-yaml.md) — 420.1K weekly downloads
- [@crewx/workflow](https://npm.io/package/@crewx/workflow.md) — 3.1K weekly downloads
- [yaml-cat](https://npm.io/package/yaml-cat.md) — 38 weekly downloads
- [nunjucks-in-yaml](https://npm.io/package/nunjucks-in-yaml.md) — 9 weekly downloads
- [shopify-symlinks](https://npm.io/package/shopify-symlinks.md) — 3 weekly downloads

## Recent versions

- 1.272.0 (latest) — 2026-10-30
- 1.271.1 — 2026-08-14
- 1.271.0 — 2026-07-03
- 1.270.0 — 2025-10-21
- 1.269.0 — 2025-05-09
- 1.268.0 — 2025-05-06
- 1.267.0 — 2025-05-02
- 1.266.0 — 2025-03-14
- 1.265.0 — 2025-03-12
- 1.264.0 — 2025-03-04
- 1.263.0 — 2025-01-28
- 1.262.0 — 2025-01-17
- 1.261.0 — 2025-01-17
- 1.260.0 — 2025-01-15
- 1.259.0 — 2024-11-14
- … 369 more at https://npm.io/package/@wmfs/cardscript-to-quasar/versions

## README

# cardscript-to-quasar

[![Tymly Cardscript](https://img.shields.io/badge/tymly-cardscript-blue.svg)](https://tymly.io/)
[![CircleCI](https://circleci.com/gh/wmfs/cardscript-to-quasar.svg?style=svg)](https://circleci.com/gh/wmfs/cardscript-to-quasar)
[![npm (scoped)](https://img.shields.io/npm/v/@wmfs/cardscript-to-quasar.svg)](https://www.npmjs.com/package/@wmfs/cardscript-to-quasar)
[![codecov](https://codecov.io/gh/wmfs/cardscript-to-quasar/branch/master/graph/badge.svg)](https://codecov.io/gh/wmfs/cardscript-to-quasar)
[![CodeFactor](https://www.codefactor.io/repository/github/wmfs/cardscript-to-quasar/badge)](https://www.codefactor.io/repository/github/wmfs/cardscript-to-quasar)
[![Dependabot badge](https://img.shields.io/badge/Dependabot-active-brightgreen.svg)](https://dependabot.com/)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/wmfs/tymly/blob/master/packages/concrete-paths/LICENSE)

> Produces HTML with Quasar-markup from Cardscript JSON

## <a name="install"></a>Install
```bash
$ npm install @wmfs/cardscript-to-quasar --save
```

## <a name="usage"></a>Usage

```javascript
const cardscriptToQuasar = require('@wmfs/cardscript-to-quasar')

const quasarTemplate = cardscriptToQuasar(
  //
  // Some Cardscript:
  //
  {
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.0",
    "type": "AdaptiveCard",
    "body": [
      {
        "type": "TextBlock",
        "text": "Change me!",
        "color": "attention",
        "horizontalAlignment": "center"
      }
    ]
  },
  // Some options:
  {
    "fieldLabelWidth": 12,
    "imageSourceTemplate": "url(statics/${imagePath})"
  }
)

// quasarTemplate:
//   HTML string with Quasar components all configured to best represent the supplied Cardscript.

```

## API

### `cardscriptToQuasar(cardscriptJSON, options)`

## Options

* All options are optional

| Option | Description |
| ------ | ----------- |
| `fieldLabelWidth` | For Cardscript components that will be generated within a [Quasar field component](https://quasar-framework.org/components/field.html), this is the value passed to the `label-width` property, defaults to `12` (e.g. labels will always be above field components, and not rendered to the side). |
| `imageSourceTemplate` | This is a string-template for use by Cardscript components such as [Jumbotron](https://wmfs.github.io/tymly-website/reference/cardscript/elements/jumbotron.html#backgroundimage) to conjure a full reference to an image. Defaults to `url(statics/${imagePath})`. Note `imagePath` here is the value provided in the Cardscript config for the component (e.g. the value of `backgroundImage` in the case of the Jumbotron).|


## <a name="test"></a>Testing

```bash
$ npm test
```

## <a name="license"></a>License
[MIT](https://github.com/wmfs/cardscript/blob/master/LICENSE)

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