/// import { Cell, Default, NAME, pattern, UI } from "commontools"; type Input = { selected: Cell>; numericChoice: Cell>; category: Cell>; activeTab: Cell>; }; type Result = { selected: string; numericChoice: number; category: string; activeTab: string; }; export default pattern( ({ selected, numericChoice, category, activeTab }) => { return { [NAME]: "ct-select demo", [UI]: (

ct-select Component Demo

String Values

ct-select uses an `items` attribute with {`{label, value}`}{" "} objects

Selected: {selected}

ct-autocomplete

ct-radio-group

Numeric Values

Values can be any type, not just strings

Selected number: {numericChoice}

Common Categories Example

Selected category: {category}

ct-tabs

Tabs use $value binding for the active tab

First Tab Second Tab Third Tab

Content for the first tab panel.

Content for the second tab panel.

Content for the third tab panel.

Active tab: {activeTab}

), selected, numericChoice, category, activeTab, }; }, );