@webx-ui/module-tariffs

Tariffs for the WebX UI admin panel: price cards with a currency, a period, what is included and a button, in groups, ordered by hand, shown on the site by a block.
2,669
Install
npm install @webx-ui/module-tariffs
Latest Version:0.2.2
Vue:3
License:MIT
Last Updated:Oct 22, 2026
Links: GitHub  ·  npm
Maintainer: ahabzig

@webx-ui/module-tariffs

The front end of the tariffs section of the WebX UI admin panel: price cards — a name, a badge, a price in a currency of the site's list with a period, or words instead of a price, the lines of what the plan includes, a description, one button and the «recommended» mark — gathered into groups and, when the site has services, linked to them.

The other half is the Composer package webx-ui/module-tariffs, which owns the tariffs, their groups and orders, the Tariffs block, tariffs() for templates and the API. A section appears in the panel when both halves are installed.

Install

npm install @webx-ui/module-tariffs
import { createAdmin } from '@webx-ui/module-admin'
import { tariffs } from '@webx-ui/module-tariffs'
import '@webx-ui/module-tariffs/style.css'

createAdmin({
  basePath: '/cms',
  modules: [...tariffs()],
}).mount()

tariffs() is two sections — Tariffs and Groups — in a menu group of their own, so it is spread into the list. tariffs({ path: '/pricing' }) puts both somewhere else inside the panel; the groups always sit under the tariffs (/pricing/groups).

On the server, the block type the module offers is installed once:

php artisan webx:blocks:offered --install --module=tariffs

The tariffs

A list and the form of one tariff side by side, without pages: the list is where tariffs are put in order, and a drag cannot cross a page boundary. The open tariff is in the address (?tariff=7), so a link to it is a link to the list around it too. New tariff is a row that opens an empty form; the tariff is created by its first save. On a phone the form slides over the list and draws its own «Back».

A row shows the name, the price in one line («$750 /mo», or the words instead of a number), a star at the recommended one and a mark when it is not published. The list narrows to a group — and then a drag is that group's own order, the whole list keeps its own — to words, or to the bin. While a search narrows the list, the grips disappear. The bin lists what was deleted, newest first, and brings it back to its places.

The form is the tariffs.form screen, described in JSON on the server: the name and the badge, Recommended, the price with its currency, period and words instead of a number, the lines of what is included, the description, the button (a label, a link and a look from the site's list), the groups, the services — only on a site that has them — Published and a card for the project's own fields. Save with the button or Ctrl+S; leaving with unsaved changes asks first. A tariff has no draft: a save is on the site.

Groups are the panel's shared category screens with this module's words: a title, Shown on the site, the order by drag.

priceLine() is the one line of the list, exported for a project that draws tariffs elsewhere in the panel.

Words

The panel's words come from the server (webx-tariffs::*, ten languages). tariffsMessages is the English floor the section falls back on while they load, or when a key is missing.

License

MIT

Related Packages

@webx-ui/module-pages

Pages for the WebX UI admin panel: the tree of a site's pages, their addresses,...

7,462 0
@webx-ui/module-blog

Blog for the WebX UI admin panel: articles made of blocks, rubrics and tags, sch...

6,583 0
@webx-ui/module-services

Services for the WebX UI admin panel: a catalogue of services made of blocks, fl...

4,031 0
@webx-ui/module-menu

Menus for the WebX UI admin panel: named menus, a tree of items, and what each o...

3,844 0
@webx-ui/module-faq

FAQ for the WebX UI admin panel: questions and answers with flat categories, ord...

3,160 0

Version History

Version Released License
0.2.2 MIT
0.2.1 MIT
0.2.0 MIT
0.1.16 MIT
0.1.15 MIT