Props
export type Props = typeof Props.Type;Effect-native UI toolkit
Interactive demosPublished API · 0.1.0-rc.1
Published themes API declarations for components/checkbox.
@wsagency/wseffect-themes · MIT · source · MIT license · WS-AGENCY-NOTICE
This entry point is published in @wsagency/wseffect-themes@0.1.0-rc.1. Import it from the package subpath shown below; the signatures and documentation are read from the installed package declarations.
import * as Wseffect from '@wsagency/wseffect-themes/components/checkbox'Propsexport type Props = typeof Props.Type;PropsProps: Schema.Struct<{
readonly id: Schema.String;
readonly size: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
[k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
}>]>>;
readonly variant: Schema.optional<Schema.Literals<readonly ["classic", "surface", "soft"]>>;
readonly color: Schema.optional<Schema.Literals<readonly ["gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "ruby", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", "sky", "custom"]>>;
readonly radius: Schema.optional<Schema.Literals<readonly ["none", "small", "medium", "large", "full"]>>;
readonly highContrast: Schema.optional<Schema.Boolean>;
readonly checked: Schema.optional<Schema.Boolean>;
readonly defaultChecked: Schema.optional<Schema.Boolean>;
readonly indeterminate: Schema.optional<Schema.Boolean>;
readonly disabled: Schema.optional<Schema.Boolean>;
readonly readOnly: Schema.optional<Schema.Boolean>;
readonly name: Schema.optional<Schema.String>;
readonly value: Schema.optional<Schema.String>;
readonly ariaLabel: Schema.optional<Schema.String>;
readonly onCheckedChange: Schema.declare<(checked: boolean) => unknown, unknown>;
}>viewview: <Message>(props: Omit<Props, 'onCheckedChange'> & {
onCheckedChange: (checked: boolean) => Message;
}, children: ReadonlyArray<Html | string>, h: HtmlBuilder<Message>) => Html| Name | Type | Required | Choices | Description |
|---|---|---|---|---|
id | string | Yes | — | — |
size | "1" | "2" | "3" | Responsive<"1" | "2" | "3"> | No | — | — |
variant | "classic" | "surface" | "soft" | No | "classic", "surface", "soft" | — |
color | "gray" | "gold" | "bronze" | "brown" | "yellow" | "amber" | "orange" | "tomato" | "red" | "ruby" | "crimson" | "pink" | "plum" | "purple" | "violet" | "iris" | "indigo" | "blue" | "cyan" | "teal" | "jade" | "green" | "grass" | "lime" | "mint" | "sky" | "custom" | No | "gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "ruby", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", "sky", "custom" | — |
radius | "none" | "small" | "medium" | "large" | "full" | No | "none", "small", "medium", "large", "full" | — |
highContrast | boolean | No | — | — |
checked | boolean | No | — | — |
defaultChecked | boolean | No | — | — |
indeterminate | boolean | No | — | — |
disabled | boolean | No | — | — |
readOnly | boolean | No | — | — |
name | string | No | — | — |
value | string | No | — | — |
ariaLabel | string | No | — | — |
onCheckedChange | Unsupported<Declaration> | Yes | — | — |
import * as Themes from '@wsagency/wseffect-themes'
import * as SliderRange from '@wsagency/wseffect-themes/components/slider/range'
import * as Option from 'effect/Option'
import { defineView } from '@wsagency/wseffect-foldkit/submodel'
import { inertHtml, type HtmlBuilder } from '@wsagency/wseffect-foldkit/html'
const example = (h: HtmlBuilder<unknown>) => Themes.Checkbox.view({ id: 'updates', checked: true, onCheckedChange: (checked) => checked }, ['Receive product updates'], h)