类型 InputGroupSnapshot

API 文档由 Go 源码生成,内容为英文。

type InputGroupSnapshot struct {
	ID           ui.ID
	Label        string
	Value        string
	DisplayValue string
	Placeholder  string
	Hint         string
	Disabled     bool
	ReadOnly     bool
	Invalid      bool
	// Secure makes a single-line control a password field, as for
	// InputSnapshot.Secure.
	Secure           bool
	Focused          bool
	Multiline        bool
	NativeEditing    bool
	NavigationKeys   bool
	ShowCaret        bool
	Caret            int
	SelectionStart   int
	SelectionEnd     int
	CompositionStart int
	CompositionEnd   int
	InlineStart      InputGroupSlot
	InlineEnd        InputGroupSlot
	BlockStart       InputGroupSlot
	BlockEnd         InputGroupSlot
}

InputGroupSnapshot is one caller-owned input or textarea presentation with four explicit shadcn addon positions.

方法

Semantics#

func (snapshot InputGroupSnapshot) Semantics() InputGroupSemantics

Semantics returns a normalized, allocation-free semantic snapshot for the embedded editor without introducing an editor runtime into the component.