Mixins / foldkit-mixins-ui

Separator

namespace · packages/mixins-ui/src/separator.ts:1

export * as Separator from './separator.js'

In the guides

Members

Separator.SeparatorSlots

const · packages/mixins-ui/src/separator.ts:10

const SeparatorSlots: Slots.Contract<{
  readonly rule: Slot.UnnamedSlot<
    Capability.Capability<
      'Container',
      readonly [
        Capability.Capability<
          'Interactive',
          readonly [Capability.Capability<'Base', readonly []>]
        >,
      ]
    >,
    readonly Slot.EventName[],
    readonly Slot.AttributeName[],
    readonly Slot.RequirementName[],
    boolean
  >
}>

A separator publishes one slot; it owns no state, messages, or bundles. Vertical separators need their container to constrain the cross axis: a bare div stretches, which is what makes the rule visible.

Separator.SeparatorView

interface · packages/mixins-ui/src/separator.ts:19

interface SeparatorView<Message = never> {
  readonly orientation?: 'horizontal' | 'vertical' | undefined
  readonly style?: NamedStyle<typeof SeparatorSlots> | undefined
  readonly mixins?: MixinList<Message> | undefined
}

A thematic break in one call: horizontal by default, vertical when the layout runs that way. A separator between menu items is decorative and stays out of the tab order on its own.

Separator.view

function · packages/mixins-ui/src/separator.ts:27

function view<Message = never>(
  options: SeparatorView<Message>,
  h: HtmlBuilder<Message>,
): Html