Documentation
¶
Overview ¶
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
Index ¶
- Constants
- func Card(componentSettings CardSettings) templ.Component
- func DataTable[Row any](componentSettings DataTableSettings[Row]) templ.Component
- func DataTableDefaultEmptyState() templ.Component
- func DataTableDefaultSearchBox() templ.Component
- func FilterBar(componentSettings FilterBarSettings) templ.Component
- func PageHeading(componentSettings PageHeadingSettings) templ.Component
- func Pagination(componentSettings PaginationSettings) templ.Component
- func Sidebar(componentSettings SidebarSettings) templ.Component
- type CardSettings
- type DataTableAlignment
- type DataTableColumnSettings
- type DataTableDensity
- type DataTablePageSize
- type DataTableSettings
- type DataTableSortDirection
- type FilterBarSettings
- type FilterSettings
- type PageHeadingSettings
- type PaginationSettings
- type SidebarSettings
Constants ¶
View Source
const ( CardBorderRadiusNone string = "none" CardBorderRadiusXs string = "xs" CardBorderRadiusSm string = "sm" CardBorderRadiusMd string = "md" CardBorderRadiusLg string = "lg" CardBorderRadiusXl string = "xl" CardShadowSizeNone string = "none" CardShadowSizeXs string = "xs" CardShadowSizeSm string = "sm" CardShadowSizeMd string = "md" CardShadowSizeLg string = "lg" CardShadowSizeXl string = "xl" CardRingThicknessXs string = "xs" CardRingThicknessSm string = "sm" CardRingThicknessMd string = "md" CardRingThicknessLg string = "lg" CardRingThicknessXl string = "xl" CardPaddingSizeNone string = "none" CardPaddingSizeXs string = "xs" CardPaddingSizeSm string = "sm" CardPaddingSizeMd string = "md" CardPaddingSizeLg string = "lg" CardPaddingSizeXl string = "xl" CardGapSizeNone string = "none" CardGapSizeXs string = "xs" CardGapSizeSm string = "sm" CardGapSizeMd string = "md" CardGapSizeLg string = "lg" CardGapSizeXl string = "xl" )
View Source
const ( DataTableUrlPlaceholderPageNumber string = "{pageNumber}" DataTableUrlPlaceholderItemsPerPage string = "{itemsPerPage}" DataTableUrlPlaceholderSortKey string = "{sortKey}" DataTableUrlPlaceholderSortDirection string = "{sortDirection}" DataTableUrlPlaceholderSearch string = "{search}" )
View Source
const ( FilterKindTextContains string = "textContains" FilterKindEnumSelect string = "enumSelect" FilterKindMultiEnumSelect string = "multiEnumSelect" FilterKindNumberRange string = "numberRange" FilterKindDateRange string = "dateRange" )
View Source
const ( PageHeadingLevelPage string = "page" PageHeadingLevelSection string = "section" )
View Source
const ( SidebarSideLeft string = "left" SidebarSideRight string = "right" SidebarAttachmentModeInline string = "inline" SidebarAttachmentModeFixed string = "fixed" )
Variables ¶
This section is empty.
Functions ¶
func Card ¶ added in v0.2.2
func Card(componentSettings CardSettings) templ.Component
func FilterBar ¶
func FilterBar(componentSettings FilterBarSettings) templ.Component
func PageHeading ¶ added in v0.2.2
func PageHeading(componentSettings PageHeadingSettings) templ.Component
func Pagination ¶
func Pagination(componentSettings PaginationSettings) templ.Component
func Sidebar ¶
func Sidebar(componentSettings SidebarSettings) templ.Component
Types ¶
type CardSettings ¶ added in v0.2.2
type CardSettings struct {
MiddleContent templ.Component
// OptionalFields
ActionsContent templ.Component
BackgroundColor string
BorderRadius string
GapSize string
HeaderContent templ.Component
HeaderIcon string
HeaderIconBackgroundColor string
HeaderIconBorderRadius string
HeaderIconColor string
HeaderIconPaddingSize string
HeaderIconPosition string
HeaderSize string
HeaderSubHeading string
HeaderSubHeadingColor string
HeaderSubHeadingOneWayStatePath string
HeaderTitle string
HeaderTitleColor string
HeaderTitleOneWayStatePath string
PaddingSize string
RingColor string
RingThickness string
ShadowSize string
TextCase string
TextColor string
}
type DataTableAlignment ¶
type DataTableAlignment string
const ( DataTableAlignmentLeft DataTableAlignment = "left" DataTableAlignmentCenter DataTableAlignment = "center" DataTableAlignmentRight DataTableAlignment = "right" )
type DataTableColumnSettings ¶
type DataTableDensity ¶
type DataTableDensity string
const ( DataTableDensityComfortable DataTableDensity = "comfortable" DataTableDensityDense DataTableDensity = "dense" )
type DataTablePageSize ¶
type DataTablePageSize uint
type DataTableSettings ¶
type DataTableSettings[Row any] struct { Columns []DataTableColumnSettings[Row] Rows []Row // OptionalFields BulkActions templ.Component CheckboxCheckedColor string CheckboxShape string CheckboxSize string CheckboxUncheckedColor string Density DataTableDensity EmptyState templ.Component FilterDropdownBackgroundColor string Filters []FilterSettings HeaderActions templ.Component HeaderClass string Id string InitialFilterValues map[string]any InitialSearchQuery string InitialSortDirection DataTableSortDirection InitialSortKey string IsHeaderSticky bool IsPaginationHiddenWhenSinglePage bool IsStriped bool ItemsPerPage DataTablePageSize ItemsPerPageSizeChoices []DataTablePageSize ItemsTotal uint PageNumber uint PaginationAriaLabel string PagesTotal uint QueryUrlTemplate string RefreshDebounceMs uint RefreshOnEvents []string RowClassResolver func(row Row) string RowIdResolver func(row Row) string RowLabelResolver func(row Row) string SearchBox templ.Component SearchBoxAlignment DataTableAlignment ShouldUseOneBasedPageDisplay bool TextCase string }
type DataTableSortDirection ¶
type DataTableSortDirection string
const ( DataTableSortDirectionAsc DataTableSortDirection = "asc" DataTableSortDirectionDesc DataTableSortDirection = "desc" )
type FilterBarSettings ¶
type FilterBarSettings struct {
Filters []FilterSettings
ValuesTwoWayStatePath string
// OptionalFields
DropdownBackgroundColor string
EnumSelectRadioGroupNamePrefix string
OnChangeFunc string
}
type FilterSettings ¶
type PageHeadingSettings ¶ added in v0.2.2
type PageHeadingSettings struct {
HeaderTitle string
Level string
// OptionalFields
ActionsContent templ.Component
Description string
HeaderIcon string
HeaderIconBackgroundColor string
HeaderIconBorderRadius string
HeaderIconColor string
HeaderIconPaddingSize string
HeaderIconPosition string
HeaderSize string
HeaderSubHeading string
HeaderSubHeadingColor string
HeaderSubHeadingOneWayStatePath string
HeaderTitleColor string
HeaderTitleOneWayStatePath string
TextCase string
TextColor string
}
type PaginationSettings ¶
type PaginationSettings struct {
PageNumberTwoWayStatePath string
ItemsPerPageTwoWayStatePath string
ItemsTotal uint
// OptionalFields
AriaLabel string
IsDisabledOneWayStatePath string
IsHiddenWhenSinglePage bool
ItemsPerPageInputName string
ItemsPerPageSizeChoices []uint
OnChangeFunc string
PagesTotal uint
ShouldUseOneBasedPageDisplay bool
}
type SidebarSettings ¶
type SidebarSettings struct {
MiddleContent templ.Component
// OptionalFields
HeaderContent templ.Component
Width string
BackgroundColor string
IsVisibleTwoWayStatePath string
IsCollapsed bool
IsCollapsedTwoWayStatePath string
AttachmentMode string
AttachmentModeTwoWayStatePath string
Side string
SideTwoWayStatePath string
IsOffCanvas bool
IsOffCanvasTwoWayStatePath string
}
Click to show internal directories.
Click to hide internal directories.