vf-search component is a form component that can be used for for the front-end to search your site.
This is the default search component that can be used to search your site. When the viewport size is below 600px the
vf-button replaces the text with an icon so that it can allow the input to use more space.
This is very much a work-in-progress prototype and not to be used.
To be used when searching pages, this container should sit below the
vf-hero (and related
vf-navigation where applicable). The code example shows that the
vf-form is wrapped in a
vf-container (this sectioning component has not been created, yet, but the base CSS is available as part of
2.0.0 of the
vf-search has no maximum width and will fill the space of it's parent. Because of this it is recommended to make sure the component is not too wide by wrapping it in the
embl-grid with the
--centered-content variant. If you wish to use ths
vf-grid you will need to make use the
vf-search component also has an appropraite
You can enable
autofocus on the search element, but should only do so if most users intend to search on the page.
This repository is distributed with npm. After installing npm and yarn, you can install with this command.
$ yarn add --dev @visual-framework/vf-search
The style files included are written in Sass. If you're using a VF-core project, you can import it like this:
Make sure you import Sass requirements along with the modules. You can use a project boilerplate or the