Documentation navigation

Published API · 0.1.0-rc.1

themes · components/aspect-ratio

Published themes API declarations for components/aspect-ratio.

./components/aspect-ratio

@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/aspect-ratio'

Exported declarations

Props

Props: Schema.Struct<{
    readonly ratio: Schema.optional<Schema.Number>;
}>

view

view: <Message>(props: ViewProps, children: ReadonlyArray<Html | string>, h: HtmlBuilder<Message>) => Html

ViewProps

export type ViewProps = typeof Props.Type;

Props

Props exported by @wsagency/wseffect-themes/components/aspect-ratio · Props · source
NameTypeRequiredChoicesDescription
rationumberNo——

Rendered component example

AspectRatio
16:9 media frame
Example usage
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.AspectRatio.view({ ratio: 16 / 9 }, [h.div([], ['16:9 media frame'])], h)