Documentation ¶ Overview ¶ Package switchc provides toggle switch components. Index ¶ func Switch(opts ...Option) g.Node type Option func Checked() Option func Disabled() Option func Required() Option func WithAttrs(attrs ...g.Node) Option func WithClass(class string) Option func WithID(id string) Option func WithName(name string) Option type Props Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Switch ¶ func Switch(opts ...Option) g.Node Switch creates a toggle switch (styled checkbox) Types ¶ type Option ¶ type Option func(*Props) func Checked ¶ func Checked() Option func Disabled ¶ func Disabled() Option func Required ¶ func Required() Option func WithAttrs ¶ func WithAttrs(attrs ...g.Node) Option func WithClass ¶ func WithClass(class string) Option func WithID ¶ func WithID(id string) Option func WithName ¶ func WithName(name string) Option type Props ¶ type Props struct { Name string ID string Checked bool Required bool Disabled bool Class string Attrs []g.Node } Source Files ¶ View all Source files switch.go Click to show internal directories. Click to hide internal directories.