Logos DX
    Preparing search index...

    Function create

    • Create an HTML element with full declarative configuration.

      Combines element creation with class, style, attribute, children, and event binding in a single call — reducing imperative boilerplate.

      Type Parameters

      Parameters

      Returns HTMLElementTagNameMap[K]

      const card = create('div', {
      text: 'Hello',
      css: { padding: '1rem', '--theme': 'dark' },
      attrs: { 'data-id': '123' },
      class: ['card', 'active'],
      children: [create('span', { text: 'child' }), 'text node'],
      on: { click: handler },
      signal: controller.signal
      });