Building with AI?
llms.txt
Examples
Interactive examples demonstrating SnipForm's directive-driven form features. Each example includes live forms and source code you can copy.
The Basics
Simple validation with sf-validate and error display with if-error directives.
validationerror displaygetting started
Error & Valid States
The if-error / then-* / else-* pattern for error and valid state styling.
then-showelse-hideelse-textthen-class
Advanced Validation
URL, date, min/max, field matching, and 20+ validation rules.
urldatemin/maxsameaccepted
Loading & Submit State
Control visibility, classes, text, and styles during form submission.
on-submit-showon-submit-texttransitions
Custom Success Content
Display custom success content with %field% variable interpolation.
sf-success%variables%
Full Example
Comprehensive example combining all features: validation, states, and results.
completeall features
Quick Reference
Validation
sf-validate:rule="msg" Error Display
if-error="field" then-show-text Submit States
on-submit-show/hide/text/class Documentation
For detailed documentation on all directives and features, visit the docs.
View Documentation