Skip to main content

type

Description​

Optional. Defines the type of the FilterBuilder presentation

Usage​

type?: "simple" | "list" | "line";

Parameters​

Mode types can be the following:

  • simple - fields are displayed vertically with restrictions: each field can be used once and rules are combined with "and" logic
  • line - fields are displayed horizontally in a line
  • list - (default) fields are displayed vertically as a list

Example​

<script>
import { getData } from "./common/data";
import { FilterBuilder } from "@svar-ui/svelte-filter";

const { value, fields, options } = getData();

</script>

<FilterBuilder {value} {fields} {options} type={"line"} />

Related articles: FilterBuilder Guide