---
title: "Form Extend"
pageTitle: "Fylgja Form Extend"
description: "Enhance your forms with advanced features, including native validation and flexible base and component styles for a wide range of form fields"
npm: "@fylgja/form-extend"
git: "https://github.com/fylgja/fylgja/tree/main/components/form-extend"
sortOrder: 11
faq:
- question: Do I need JavaScript for range slider fills to work?
answer: Not necessarily. The default range styling needs a small JS snippet to
update --range-value on input, as shown above. The range-fill import
provides a CSS-only alternative using scroll-driven animations, supported
in Safari 26+. If you need to support older Safari versions (Fylgja's
baseline goes back to 17), use the JavaScript approach instead.
- question: Why isn't the value fill working in Safari?
answer: range-fill depends on scroll-driven animations, which Safari only
supports from version 26 onward. It works fine there, but if you still
need to support Safari 17 through 25, use the JavaScript-based approach
instead.
- question: How do I show a validation error message for a field?
answer: Add aria-errormessage on the input pointing to an element with the
field-error-message class, and wrap both in a common .field container. The
message stays hidden until the field is invalid or has aria-invalid="true"
set.
- question: Does field-error-message work if the message isn't right next to the input?
answer: Yes, as long as both the input and the message are inside the same
.field wrapper, the error message will show correctly even if it's not
placed directly next to the field.
- question: How do I make a range input vertical?
answer: Add the range-vertical class to the element, as
shown in the "Volume" example above.
- question: Why does the CSS-only range fill stop working after a production build?
answer: 'The source CSS is fine, but Lightning CSS, the CSS minifier in Vite and
other tools, folds animation-timeline into the animation shorthand. No browser
accepts a timeline inside the shorthand, so the whole declaration is dropped and
the fill no longer follows the thumb. Until it is fixed upstream, move
animation-timeline into an @supports (animation-timeline: view()) rule right
after the original rule, before the CSS is minified, so the minifier cannot
merge it back. See the
[Lightning CSS issue](https://github.com/parcel-bundler/lightningcss/issues/1283)
for the status of the fix.'
---
import InstallTabs from "@/components/InstallTabs.astro";
Enhance your forms with advanced features, including native validation and flexible base and component styles for a wide range of form fields.
## Installation
## Usage
Once installed, you can import the full package with:
```css
@import "@fylgja/form-extend";
```
Alternatively, if you only need specific parts, you can import them individually:
| Import Path | Description |
| ------------------------------------ | --------------------------------------------------- |
| `@fylgja/form-extend/field-error` | Styles for form validation and error messages |
| `@fylgja/form-extend/meter-progress` | Styles for `` and `