# Module @saltcorn/markup

This is the saltcorn-markup package

- Defined in saltcorn-markup/index.ts:1

#####
Index

### Properties

export=

## Properties

### export=

export=: {
a: TagFunction;
alert: ((type, s) => string);
badge: ((col, lbl) => string);
button: TagFunction;
div: TagFunction;
helpers: {
checkbox_group: ((__namedParameters) => string);
dropdown_checkboxes: ((__namedParameters) => string);
isdef: ((x) => boolean);
pagination: ((opts) => string);
radio_group: ((opts) => string);
search_bar: ((name, v, param2?) => string);
select_options: ((v, hdr, force_required?, neutral_label?, sort?) => string);
};
hr: TagFunction;
i: TagFunction;
input: TagFunction;
link: ((href, s, attributes?) => string);
localeDate: ((date, options?, locale?) => string);
localeDateTime: ((date, options?, locale?) => string);
localeTime: ((date, options?, locale?) => string);
mkForm: ((form, csrfToken, errors?) => string);
mkFormContentNoLayout: ((form, errors?) => string);
mkTable: ((hdrs, vs, opts?) => string);
post_btn: ((href, s, csrfToken, opts?) => string);
post_delete_btn: ((href, req, what?) => string);
post_dropdown_item: ((href, s, req, confirm?, what?) => string);
renderBuilder: ((__namedParameters, csrfToken) => string);
renderForm: ((form, csrfToken0) => string);
renderFormLayout: ((form) => string);
settingsDropdown: ((id, elems) => string);
tabs: ((obj) => string);
tags: TagExports;
toast: ((type, s, id?) => string);
}

#### Type declaration

- ##### a: TagFunction

- ##### alert: ((type, s) => string)

  - - (type, s): string

    - creates an alert div (deprecated, use toast)

      #### Parameters

      - ##### type: string

      - ##### s: string

      #### Returns string

- ##### badge: ((col, lbl) => string)

  - - (col, lbl): string

    - #### Parameters

      - ##### col: string

      - ##### lbl: string

      #### Returns string

- ##### button: TagFunction

- ##### div: TagFunction

- ##### helpers: {
  checkbox_group: ((__namedParameters) => string);
  dropdown_checkboxes: ((__namedParameters) => string);
  isdef: ((x) => boolean);
  pagination: ((opts) => string);
  radio_group: ((opts) => string);
  search_bar: ((name, v, param2?) => string);
  select_options: ((v, hdr, force_required?, neutral_label?, sort?) => string);
  }

  - ##### checkbox_group: ((__namedParameters) => string)

    - - (__namedParameters): string

      - #### Parameters

        - ##### __namedParameters: CheckBoxGroupOpts

        #### Returns string

  - ##### dropdown_checkboxes: ((__namedParameters) => string)

    - - (__namedParameters): string

      - #### Parameters

        - ##### __namedParameters: {
          btnClass: string;
          btnLabel: string;
          checked: Record<string, boolean>;
          items: (string | {
          label: string;
          value: string;
          })[];
          onChange?: string;
          }

          - ##### btnClass: string

          - ##### btnLabel: string

          - ##### checked: Record<string, boolean>

          - ##### items: (string | {
            label: string;
            value: string;
            })[]

          - ##### `Optional` onChange?: string

        #### Returns string

  - ##### isdef: ((x) => boolean)

    - - (x): boolean

      - checks if x is defined

        #### Parameters

        - ##### x: any

        #### Returns boolean

  - ##### pagination: ((opts) => string)

    - - (opts): string

      - #### Parameters

        - ##### opts: PaginationOpts

        #### Returns string

  - ##### radio_group: ((opts) => string)

    - - (opts): string

      - #### Parameters

        - ##### opts: RadioGroupOpts

        #### Returns string

  - ##### search_bar: ((name, v, param2?) => string)

    - - (name, v, param2?): string

      - #### Parameters

        - ##### name: string

        - ##### v: string | number

        - ##### param2: any = {}

        #### Returns string

  - ##### select_options: ((v, hdr, force_required?, neutral_label?, sort?) => string)

    - - (v, hdr, force_required?, neutral_label?, sort?): string

      - #### Parameters

        - ##### v: any

        - ##### hdr: any

        - ##### `Optional` force_required: boolean

        - ##### neutral_label: string = ""

        - ##### sort: boolean = true

        #### Returns string

- ##### hr: TagFunction

- ##### i: TagFunction

- ##### input: TagFunction

- ##### link: ((href, s, attributes?) => string)

  - - (href, s, attributes?): string

    - #### Parameters

      - ##### href: string

      - ##### s: string

      - ##### attributes: any = {}

      #### Returns string

- ##### localeDate: ((date, options?, locale?) => string)

  - - (date, options?, locale?): string

    - #### Parameters

      - ##### date: Date

      - ##### options: any = {}

      - ##### locale: string = "en"

      #### Returns string

- ##### localeDateTime: ((date, options?, locale?) => string)

  - - (date, options?, locale?): string

    - #### Parameters

      - ##### date: Date

      - ##### options: any = {}

      - ##### locale: string = "en"

      #### Returns string

- ##### localeTime: ((date, options?, locale?) => string)

  - - (date, options?, locale?): string

    - #### Parameters

      - ##### date: Date

      - ##### options: any = ...

      - ##### locale: string = "en"

      #### Returns string

- ##### mkForm: ((form, csrfToken, errors?) => string)

  - - (form, csrfToken, errors?): string

    - #### Parameters

      - ##### form: AbstractForm

      - ##### csrfToken: string | boolean

      - ##### errors: any = {}

      #### Returns string

- ##### mkFormContentNoLayout: ((form, errors?) => string)

  - - (form, errors?): string

    - #### Parameters

      - ##### form: AbstractForm

      - ##### errors: any = {}

      #### Returns string

- ##### mkTable: ((hdrs, vs, opts?) => string)

  - - (hdrs, vs, opts?): string

    - #### Parameters

      - ##### hdrs: HeadersParams[]

      - ##### vs: any[]

      - ##### `Optional` opts: any = {}

      #### Returns string

      #### Function

- ##### post_btn: ((href, s, csrfToken, opts?) => string)

  - - (href, s, csrfToken, opts?): string

    - #### Parameters

      - ##### href: string

      - ##### s: string

      - ##### csrfToken: string

      - ##### opts: any = {}

      #### Returns string

- ##### post_delete_btn: ((href, req, what?) => string)

  - - (href, req, what?): string

    - UI Form for Delete Item confirmation

      #### Parameters

      - ##### href: string

        href

      - ##### req: any

        Request

      - ##### `Optional` what: string

      #### Returns string

      return html form

- ##### post_dropdown_item: ((href, s, req, confirm?, what?) => string)

  - - (href, s, req, confirm?, what?): string

    - #### Parameters

      - ##### href: string

      - ##### s: string

      - ##### req: any

      - ##### `Optional` confirm: boolean

      - ##### `Optional` what: string

      #### Returns string

- ##### renderBuilder: ((__namedParameters, csrfToken) => string)

  - - (__namedParameters, csrfToken): string

    - #### Parameters

      - ##### __namedParameters: any

      - ##### csrfToken: any

      #### Returns string

- ##### renderForm: ((form, csrfToken0) => string)

  - - (form, csrfToken0): string

    - #### Parameters

      - ##### form: string | AbstractForm

      - ##### csrfToken0: string | boolean

      #### Returns string

- ##### renderFormLayout: ((form) => string)

  - - (form): string

    - #### Parameters

      - ##### form: AbstractForm

      #### Returns string

- ##### settingsDropdown: ((id, elems) => string)

  - - (id, elems): string

    - #### Parameters

      - ##### id: string

      - ##### elems: any

      #### Returns string

- ##### tabs: ((obj) => string)

  - - (obj): string

    - #### Parameters

      - ##### obj: any

      #### Returns string

- ##### tags: TagExports

- ##### toast: ((type, s, id?) => string)

  - - (type, s, id?): string

    - creates a toast div

      #### Parameters

      - ##### type: string

        bootstrap type

      - ##### s: string

      - ##### `Optional` id: string

      #### Returns string

- Defined in saltcorn-markup/index.ts:331

Generated using TypeDoc