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/text-area.
@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/text-area'Propsexport type Props = typeof Props.Type;PropsProps: Schema.Struct<{
readonly id: Schema.String;
readonly label: Schema.optional<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 resize: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
[k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
}>]>>;
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 value: Schema.optional<Schema.String>;
readonly defaultValue: Schema.optional<Schema.String>;
readonly disabled: Schema.optional<Schema.Boolean>;
readonly readOnly: Schema.optional<Schema.Boolean>;
readonly invalid: Schema.optional<Schema.Boolean>;
readonly autofocus: Schema.optional<Schema.Boolean>;
readonly name: Schema.optional<Schema.String>;
readonly required: Schema.optional<Schema.Boolean>;
readonly rows: Schema.optional<Schema.Number>;
readonly placeholder: Schema.optional<Schema.String>;
}>viewview: <Message>(props: ViewProps<Message>, children: ReadonlyArray<Html | string>, h: HtmlBuilder<Message>) => HtmlViewPropsexport type ViewProps<Message> = Props & Readonly<{
onInput?: (value: string) => Message;
/** Additional native textarea attributes and event handlers. The typed list supports Foldkit's full textarea attribute set and is forwarded directly to the `<textarea>`. */
textareaAttributes?: ReadonlyArray<TextareaAttribute<Message>>;
}>;| Name | Type | Required | Choices | Description |
|---|---|---|---|---|
id | string | Yes | — | — |
label | string | No | — | — |
size | "1" | "2" | "3" | Responsive<"1" | "2" | "3"> | No | — | — |
variant | "classic" | "surface" | "soft" | No | "classic", "surface", "soft" | — |
resize | "none" | "vertical" | "horizontal" | "both" | Responsive<"none" | "vertical" | "horizontal" | "both"> | No | — | — |
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" | — |
value | string | No | — | — |
defaultValue | string | No | — | — |
disabled | boolean | No | — | — |
readOnly | boolean | No | — | — |
invalid | boolean | No | — | — |
autofocus | boolean | No | — | — |
name | string | No | — | — |
required | boolean | No | — | — |
rows | number | No | — | — |
placeholder | string | No | — | — |
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.TextArea.view({ id: 'summary', value: 'Release notes', onInput: (value) => value }, [], h)