Member-only story

Developing Vue Apps with the Quasar Library — Input and Tag Pickers

John Au-Yeung
3 min readFeb 17, 2021

--

Photo by Kari Shea on Unsplash

Quasar is a popular Vue UI library for developing good looking Vue apps.

In this article, we’ll take a look at how to create Vue apps with the Quasar UI library.

Controlled Input Picker

We can add a controlled input picker with the value and onChange props.

For instance, we can write:

import React, { useState } from "react";
import { InputPicker } from "rsuite";
import "rsuite/dist/styles/rsuite-default.css";
const data = [
{
label: "Apple",
value: "apple",
role: "fruit"
},
{
label: "Orange",
value: "orange",
role: "fruit"
}
];
export default function App() {
const [value, setValue] = useState();
const handleChange = (val) => {
setValue(val);
};
return (
<div className="App">
<InputPicker data={data} value={value} onChange={handleChange} />
</div>
);
}

value has the selected value.

handleChange has the val parameter to let us get the value from the input picker.

Then we can use that to set the value with setValue .

Tag Picker

--

--

No responses yet