Documentation
¶
Index ¶
- Variables
- func InputGroup(p InputGroupProps) gx.Node
- func InputGroupAddon(p InputGroupAddonProps) gx.Node
- func InputGroupButton(p InputGroupButtonProps) gx.Node
- func InputGroupInput(p InputGroupInputProps) gx.Node
- func InputGroupInputWrap(n gx.Node) gx.Node
- func InputGroupText(p InputGroupTextProps) gx.Node
- func InputGroupTextarea(p InputGroupTextareaProps) gx.Node
- func InputGroupTextareaWrap(n gx.Node) gx.Node
- type Align
- type InputGroupAddonProps
- type InputGroupButtonProps
- type InputGroupInputProps
- type InputGroupProps
- type InputGroupTextProps
- type InputGroupTextareaProps
- type Size
Constants ¶
This section is empty.
Variables ¶
View Source
var InputGroupAddonFixtures = gx.Fixtures[InputGroupAddonProps]{"Text": {Children: gx.Text("@")}}
View Source
var InputGroupButtonFixtures = gx.Fixtures[InputGroupButtonProps]{ "ExtraSmall": {Children: gx.Text("Search")}, "Small": {Size: Sm, Children: gx.Text("Search")}, "IconXs": {Size: IconXs, Attrs: name("Clear"), Children: icons.X(icons.XProps{})}, "IconSm": {Size: IconSm, Attrs: name("Clear"), Children: icons.X(icons.XProps{})}, }
View Source
var InputGroupFixtures = gx.Fixtures[InputGroupProps]{ "LeadingText": {Children: gx.Frag( InputGroupAddon(InputGroupAddonProps{Children: InputGroupText(InputGroupTextProps{Children: gx.Text("$")})}), InputGroupInput(InputGroupInputProps{Placeholder: "0.00", Attrs: name("Amount")}), )}, "TrailingText": {Children: gx.Frag( InputGroupInput(InputGroupInputProps{Placeholder: "example", Attrs: name("Domain")}), InputGroupAddon(InputGroupAddonProps{Align: InlineEnd, Children: InputGroupText(InputGroupTextProps{Children: gx.Text(".com")})}), )}, "Button": {Children: gx.Frag( InputGroupInput(InputGroupInputProps{Placeholder: "Search", Attrs: name("Search")}), InputGroupAddon(InputGroupAddonProps{Align: InlineEnd, Children: InputGroupButton(InputGroupButtonProps{Children: gx.Text("Search")})}), )}, "IconButton": {Children: gx.Frag( InputGroupInput(InputGroupInputProps{Value: "ada@example.com", Attrs: name("Email")}), InputGroupAddon(InputGroupAddonProps{Align: InlineEnd, Children: InputGroupButton(InputGroupButtonProps{ Size: IconXs, Attrs: name("Clear"), Children: icons.X(icons.XProps{}), })}), )}, "Invalid": {Children: gx.Frag( InputGroupAddon(InputGroupAddonProps{Children: icons.Info(icons.InfoProps{})}), InputGroupInput(InputGroupInputProps{Value: "ada@", Attrs: gx.Attrs{{Key: "aria-label", Value: "Email"}, {Key: "aria-invalid", Value: "true"}}}), )}, "Textarea": {Children: gx.Frag( InputGroupTextarea(InputGroupTextareaProps{Placeholder: "Ask a question.", Attrs: name("Question")}), InputGroupAddon(InputGroupAddonProps{Align: BlockEnd, Children: gx.Frag( InputGroupText(InputGroupTextProps{Children: gx.Text("120 characters left")}), InputGroupButton(InputGroupButtonProps{Variant: button.Default, Size: Sm, Class: "ml-auto", Children: gx.Text("Send")}), )}), )}, "BlockStart": {Children: gx.Frag( InputGroupAddon(InputGroupAddonProps{Align: BlockStart, Children: InputGroupText(InputGroupTextProps{Children: gx.Text("Amount")})}), InputGroupInput(InputGroupInputProps{Placeholder: "0.00", Attrs: name("Amount")}), )}, }
View Source
var InputGroupInputFixtures = gx.Fixtures[InputGroupInputProps]{"Placeholder": {Placeholder: "Value", Attrs: name("Value")}}
View Source
var InputGroupTextFixtures = gx.Fixtures[InputGroupTextProps]{"Text": {Children: gx.Text("Text")}}
View Source
var InputGroupTextareaFixtures = gx.Fixtures[InputGroupTextareaProps]{
"Placeholder": {Placeholder: "Ask a question.", Attrs: name("Question")},
}
Functions ¶
func InputGroup ¶
func InputGroup(p InputGroupProps) gx.Node
func InputGroupAddon ¶
func InputGroupAddon(p InputGroupAddonProps) gx.Node
func InputGroupButton ¶
func InputGroupButton(p InputGroupButtonProps) gx.Node
func InputGroupInput ¶
func InputGroupInput(p InputGroupInputProps) gx.Node
func InputGroupInputWrap ¶
InputGroupInputWrap renders the input in a group, which draws its border and its focus ring.
func InputGroupText ¶
func InputGroupText(p InputGroupTextProps) gx.Node
func InputGroupTextarea ¶
func InputGroupTextarea(p InputGroupTextareaProps) gx.Node
Types ¶
type InputGroupAddonProps ¶
type InputGroupAddonProps struct {
// Align sets the position of the addon: InlineStart, InlineEnd, BlockStart or BlockEnd.
Align Align
// Class adds classes to the root element.
Class string
// Children is the content of the addon, for example an icon, text or a button.
Children gx.Node
// Attrs adds HTML attributes to the root element.
Attrs gx.Attrs
}
type InputGroupButtonProps ¶
type InputGroupButtonProps struct {
// Variant sets the visual style. It takes a button.Variant: Default, Secondary, Destructive,
// Outline, Ghost or Link.
Variant button.Variant
// Size sets the height and padding: Xs, Sm, or IconXs or IconSm for a square button.
Size Size
// Type is the type attribute: "button", "submit" or "reset".
Type string
// Class adds classes to the root element.
Class string
// Children is the button label.
Children gx.Node
// Attrs adds HTML attributes to the root element.
Attrs gx.Attrs
}
type InputGroupInputProps ¶
type InputGroupInputProps struct {
// Id is the id of the root element. A label points at it.
Id string
// Type is the type attribute. Empty means "text".
Type string
// Name is the name attribute. The form sends the value under this name.
Name string
// Value is the value attribute: the start value of the input.
Value string
// Placeholder is the placeholder attribute: the hint text of an empty control.
Placeholder string
// Class adds classes to the root element.
Class string
// Attrs adds HTML attributes to the root element.
Attrs gx.Attrs
}
type InputGroupProps ¶
type InputGroupTextProps ¶
type InputGroupTextareaProps ¶
type InputGroupTextareaProps struct {
// Id is the id of the root element. A label points at it.
Id string
// Name is the name attribute. The form sends the value under this name.
Name string
// Value is the start text of the textarea.
Value string
// Placeholder is the placeholder attribute: the hint text of an empty control.
Placeholder string
// Class adds classes to the root element.
Class string
// Attrs adds HTML attributes to the root element.
Attrs gx.Attrs
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.