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/tab-nav.
@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/tab-nav'Propsexport type Props = typeof Props.Type;PropsProps: Schema.Struct<{
readonly items: Schema.$Array<Schema.Struct<{
readonly value: Schema.String;
readonly href: Schema.String;
readonly label: Schema.String;
}>>;
readonly currentValue: Schema.String;
readonly ariaLabel: 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 wrap: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
[k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
}>]>>;
readonly justify: 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 highContrast: Schema.optional<Schema.Boolean>;
}>viewview: <Message>(props: Props, _children: ReadonlyArray<Html | string>, h: HtmlBuilder<Message>) => Html| Name | Type | Required | Choices | Description |
|---|---|---|---|---|
items | Array<{ value: string; href: string; label: string }> | Yes | — | — |
currentValue | string | Yes | — | — |
ariaLabel | string | Yes | — | — |
size | "1" | "2" | Responsive<"1" | "2"> | No | — | — |
wrap | "nowrap" | "wrap" | "wrap-reverse" | Responsive<"nowrap" | "wrap" | "wrap-reverse"> | No | — | — |
justify | "start" | "center" | "end" | Responsive<"start" | "center" | "end"> | 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" | — |
highContrast | boolean | 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.TabNav.view({ items: [{ value: 'getting-started', href: '/getting-started/', label: 'Getting started' }, { value: 'themes', href: '/themes/', label: 'Themes' }], currentValue: 'getting-started', ariaLabel: 'Documentation sections' }, [], h)