Centralized UI components for the Voile frontend
Summary
Functions
Builds a search URL with GLAM type and query parameters
Collection card component for displaying collection information.
Compact search suggestions component for better performance
Empty state component for when no results are found.
Custom pagination component for frontend views (renamed from the original pagination).
Collection card with GLAM type support
GLAM type badge component
Returns a human-readable description for each GLAM type
GLAM type filter component for search results
Returns the appropriate icon for a GLAM type
Highlights search query within text
Item card component for displaying item information.
Item row component for list view display.
Main Search Component for GLAM (Gallery, Library, Archive, Museum)
Related item card component for showing related items.
Search suggestions dropdown component
Statistics item component for displaying stats with icons.
Functions
Builds a search URL with GLAM type and query parameters
Collection card component for displaying collection information.
Attributes
collection(:map) (required)
Compact search suggestions component for better performance
Attributes
results(:list) (required)search_query(:string) - Defaults to"".current_glam_type(:string) - Defaults to"quick".selected_index(:integer) - Defaults to-1.max_results(:integer) - Defaults to6.
Empty state component for when no results are found.
Attributes
search_query(:string) - Defaults to"".icon_name(:string) - Defaults to"hero-book-open".title(:string) - Defaults to"No results found".message(:string) - Defaults to"".
Custom pagination component for frontend views (renamed from the original pagination).
Attributes
current_page(:integer) (required)total_pages(:integer) (required)search_query(:string) - Defaults to"".filter_unit_id(:string) - Defaults to"all".filter_status(:string) - Defaults to"published".type_page(:string) - Defaults to"collections".filter_glam_type(:string) - Defaults to"all".socket(:map) - Defaults tonil.
Collection card with GLAM type support
Attributes
collection(:map) (required)show_glam_type(:boolean) - Defaults totrue.
GLAM type badge component
Attributes
glam_type(:string) (required)size(:string) - Defaults to"sm".
Returns a human-readable description for each GLAM type
GLAM type filter component for search results
Attributes
current_glam_type(:string) - Defaults to"quick".search_query(:string) - Defaults to"".counts(:map) - Defaults to%{}.
Returns the appropriate icon for a GLAM type
Highlights search query within text
Attributes
text(:string) (required)query(:string) - Defaults to"".
Item card component for displaying item information.
Attributes
item(:map) (required)
Item row component for list view display.
Attributes
item(:map) (required)
Main Search Component for GLAM (Gallery, Library, Archive, Museum)
Examples
<.main_search current_glam_type="quick" search_query="" />
The component accepts current_glam_type and search_query for state management.
Attributes
current_glam_type(:string) - Defaults to"quick".search_query(:string) - Defaults to"".form_action(:string) - Defaults to"/search".live_action(:atom) - Defaults tonil.search_results(:list) - Defaults to[].show_suggestions(:boolean) - Defaults tofalse.loading(:boolean) - Defaults tofalse.
Search suggestions dropdown component
Attributes
results(:list) (required)search_query(:string) - Defaults to"".current_glam_type(:string) - Defaults to"quick".max_results(:integer) - Defaults to8.
Statistics item component for displaying stats with icons.
Attributes
icon(:string) (required)value(:string) (required)label(:string) (required)