Documentation
¶
Index ¶
- Variables
- func DataList(p DataListProps) templ.Component
- func DataOption(p DataOptionProps) templ.Component
- func Fieldset(p FieldsetProps) templ.Component
- func FieldsetClasses(p FieldsetProps) string
- func Form(p FormProps) templ.Component
- func FormDescription(p FormDescriptionProps, value string) templ.Component
- func FormItem(p FormItemProps) templ.Component
- func FormMessage(p FormMessageProps, value string) templ.Component
- func Legend(p LegendProps) templ.Component
- func LegendClasses(p LegendProps) string
- func Meter(p MeterProps) templ.Component
- func MeterClasses(p MeterProps) string
- func Output(p OutputProps) templ.Component
- func Progress(p ProgressProps) templ.Component
- func ProgressClasses(p ProgressProps) string
- type DataListProps
- type DataOptionProps
- type FieldsetProps
- type FormDescriptionProps
- type FormItemProps
- type FormMessageProps
- type FormProps
- type LegendProps
- type MeterProps
- type OutputProps
- type ProgressProps
Constants ¶
This section is empty.
Variables ¶
var FieldsetVariants = uiutils.Variants{ Base: "grid gap-4", Keys: []string{"variant", "size"}, Defaults: map[string]string{"variant": "default", "size": "default"}, ByKey: map[string]map[string]string{ "variant": { "default": "", "card": "rounded-md border border-border p-4", "inline": "flex flex-wrap items-start gap-3", "unstyled": "", }, "size": { "sm": "gap-2", "default": "gap-4", "lg": "gap-6", }, }, }
var LegendVariants = uiutils.Variants{ Base: "text-sm font-medium", Keys: []string{"variant", "size"}, Defaults: map[string]string{"variant": "default", "size": "default"}, ByKey: map[string]map[string]string{ "variant": { "default": "", "muted": "text-muted-foreground", "unstyled": "", }, "size": { "sm": "text-xs", "default": "text-sm", "lg": "text-base", }, }, }
var MeterVariants = uiutils.Variants{ Base: "h-2 w-full", Keys: []string{"variant", "size"}, Defaults: map[string]string{"variant": "default", "size": "default"}, ByKey: map[string]map[string]string{ "variant": { "default": "accent-primary", "muted": "accent-muted-foreground", "unstyled": "", }, "size": { "sm": "h-1", "default": "h-2", "lg": "h-3", }, }, }
var ProgressVariants = uiutils.Variants{ Base: "h-2 w-full", Keys: []string{"variant", "size"}, Defaults: map[string]string{"variant": "default", "size": "default"}, ByKey: map[string]map[string]string{ "variant": { "default": "accent-primary", "muted": "accent-muted-foreground", "unstyled": "", }, "size": { "sm": "h-1", "default": "h-2", "lg": "h-3", }, }, }
Functions ¶
func DataOption ¶
func DataOption(p DataOptionProps) templ.Component
DataOption renders an option inside datalist.
func FieldsetClasses ¶
func FieldsetClasses(p FieldsetProps) string
func FormDescription ¶
func FormDescription(p FormDescriptionProps, value string) templ.Component
FormDescription renders muted helper copy below a control.
func FormItem ¶
func FormItem(p FormItemProps) templ.Component
FormItem groups a single field with spacing for label and control.
func FormMessage ¶
func FormMessage(p FormMessageProps, value string) templ.Component
FormMessage renders destructive validation feedback.
func LegendClasses ¶
func LegendClasses(p LegendProps) string
func MeterClasses ¶
func MeterClasses(p MeterProps) string
func ProgressClasses ¶
func ProgressClasses(p ProgressProps) string
Types ¶
type DataListProps ¶
type DataListProps struct {
ID string
Class string
Attrs templ.Attributes
}
DataListProps configures datalist.
type DataOptionProps ¶
type DataOptionProps struct {
Value string
Label string
Attrs templ.Attributes
}
DataOptionProps configures option inside datalist.
type FieldsetProps ¶
type FieldsetProps struct {
Variant string
Size string
Class string
Name string
Form string
Disabled bool
Attrs templ.Attributes
}
FieldsetProps configures a fieldset group.
type FormDescriptionProps ¶
type FormDescriptionProps struct {
Class string
}
FormDescriptionProps styles supplementary field hint text.
type FormItemProps ¶
type FormItemProps struct {
Class string
}
FormItemProps wraps one label + control + helper text group.
type FormMessageProps ¶
type FormMessageProps struct {
Class string
}
FormMessageProps styles validation or error text (role=alert).
type FormProps ¶
type FormProps struct {
ID string
Class string
Action string
Method string
Enctype string
Autocomplete string
Name string
Target string
NoValidate bool
Attrs templ.Attributes
}
FormProps configures the native form element.
type LegendProps ¶
type LegendProps struct {
Variant string
Size string
Class string
Attrs templ.Attributes
}
LegendProps configures a legend.
type MeterProps ¶
type MeterProps struct {
Variant string
Size string
ID string
Class string
Value string
Min string
Max string
Low string
High string
Optimum string
Attrs templ.Attributes
}
MeterProps configures meter.
type OutputProps ¶
type OutputProps struct {
ID string
Class string
Name string
For string
Value string
Attrs templ.Attributes
}
OutputProps configures output.
type ProgressProps ¶
type ProgressProps struct {
Variant string
Size string
ID string
Class string
Value string
Max string
Attrs templ.Attributes
}
ProgressProps configures progress.