Skip to content

Components Forms

Select

The browser's own select, styled.

$ pyblade ui:add select

A select

Props

Written as attributes of <pb-ui.select>; put a colon before one to pass it a Python value, as in :items="items". A slot is written <pb-slot:name>.

NameTypeDefaultDescription
options list [] Strings, or {"value", "label"}; the slot may hold more <option>s
value str "" The value selected
placeholder str "" A first option that cannot be picked
invalid bool False Marks it as invalid
class str "" Added to the classes of the component. Every other attribute is spread on it too.