Configuration
Configuration Object
The main configuration interface for FishtVue provides comprehensive control over component styling, theming, and behavior.
Getting FishtVue Instance
There are several ways to get the FishtVue instance:
Using Dependency Injection (Recommended)
The recommended way is to use Vue's dependency injection system:
Using Global Window Object
Alternatively, you can access the instance through the global window object:
Configuration Properties
componentsStyle
Defines the style mode for components. Available options are:
filled- Components with filled backgroundoutlined- Components with outlined bordersunderlined- Components with bottom border only
unstyled
When set to true, components will not include any built-in styles, allowing you to apply custom styling using CSS frameworks like Tailwind or Bootstrap.
locale
FishtVue provides comprehensive internationalization support through its locale system. You can configure default languages, add custom translations, and dynamically switch between different locales.
optionsTheme
Theme options provide fine-grained control over theme behavior, including CSS layer configuration, dark mode settings, and theme prefix customization.
componentsOptions
Global configuration object that maps component names to their default options and behavior settings. This allows you to set default properties for all components of a specific type.
Instance Methods
The FishtVue instance provides several methods for managing configuration:
useFishtVue()
Returns a readonly copy of the FishtVue instance.
getOptions()
Gets component options either for a specific component or all components.
getActiveLocale()
Gets the currently active locale.
setActiveLocale()
Sets the active locale.
getDefaultLocale()
Gets the default locale.