diff --git a/examples/meilisearch_searchbar/.gitignore b/examples/meilisearch_searchbar/.gitignore
new file mode 100644
index 0000000000..f534b27d33
--- /dev/null
+++ b/examples/meilisearch_searchbar/.gitignore
@@ -0,0 +1,5 @@
+/target
+meilisearch
+data.ms
+dumps
+Cargo.lock
\ No newline at end of file
diff --git a/examples/meilisearch_searchbar/Cargo.toml b/examples/meilisearch_searchbar/Cargo.toml
new file mode 100644
index 0000000000..6cce5ff226
--- /dev/null
+++ b/examples/meilisearch_searchbar/Cargo.toml
@@ -0,0 +1,61 @@
+[package]
+name = "meilisearch_searchbar"
+version = "0.1.0"
+edition = "2021"
+
+
+[lib]
+crate-type = ["cdylib", "rlib"]
+
+[dependencies]
+leptos = {version = "0.6.5",features = ["nightly"]}
+leptos_axum = { version = "0.6.5", optional = true}
+meilisearch-sdk = { version = "0.24.3", optional = true}
+axum = {version = "0.7.4", optional = true}
+leptos_meta = {version = "0.6.5",features = ["nightly"]}
+leptos_router = {version = "0.6.5",features = ["nightly"]}
+console_log = "1.0.0"
+console_error_panic_hook = "0.1.7"
+log = "0.4.20"
+tower = {verison= "0.4.13", optional=true}
+tower-http = {version = "0.5.1", optional = true, features = ["fs"]}
+simple_logger = {version = "4.3.3", optional = true}
+tokio = { version = "1", features = ["full"], optional = true }
+lazy_static = { version = "1.4.0", optional = true }
+serde = "1.0.196"
+serde_json = "1.0.113"
+csv = {version = "1.3.0", optional=true}
+
+[features]
+default = ["ssr"]
+hydrate = ["leptos/hydrate","leptos_meta/hydrate","leptos_router/hydrate"]
+ssr = [
+ "tokio",
+ "lazy_static",
+ "simple_logger",
+ "dep:meilisearch-sdk",
+ "dep:axum",
+ "leptos/ssr",
+ "leptos_meta/ssr",
+ "leptos_router/ssr",
+ "tower",
+ "tower-http",
+ "leptos_axum",
+ "csv",
+]
+lazy_static = ["dep:lazy_static"]
+
+[package.metadata.leptos]
+output-name = "meilisearch_searchbar"
+site-root = "target/site"
+site-pkg-dir = "pkg"
+assets-dir = "public"
+site-addr = "127.0.0.1:3000"
+reload-port = 3001
+browserquery = "defaults"
+watch = false
+env = "DEV"
+bin-features = ["ssr"]
+bin-default-features = false
+lib-features = ["hydrate"]
+lib-default-features = false
diff --git a/examples/meilisearch_searchbar/README.md b/examples/meilisearch_searchbar/README.md
new file mode 100644
index 0000000000..350aeefa3e
--- /dev/null
+++ b/examples/meilisearch_searchbar/README.md
@@ -0,0 +1,26 @@
+# Meilisearch Searchbar
+
+This show how to integrate meilisearch with a leptos app, including a search bar and showing the results to the user.
+
+We'll run meilisearch locally, as opposed to using their cloud service.
+
+To get started install meilisearch into this example's root.
+
+```sh
+curl -L https://install.meilisearch.com | sh
+```
+
+Run it.
+
+```sh
+./meilisearch
+```
+
+Then set the environment variable and serve the app. I've included the address of my own local meilisearch server.
+I didn't provide a password to meilisearch during my setup, and I didn't provide one in my environment variables either.
+```sh
+MEILISEARCH_URL=http://localhost:7700 && cargo leptos serve
+```
+
+Navigate to 127.0.0.1:3000 and start typing in popular American company names. (Boeing, Pepsi, etc)
+
diff --git a/examples/meilisearch_searchbar/data_set.csv b/examples/meilisearch_searchbar/data_set.csv
new file mode 100644
index 0000000000..09d2b4f025
--- /dev/null
+++ b/examples/meilisearch_searchbar/data_set.csv
@@ -0,0 +1,504 @@
+name,last,high,low,absolute_change,percent_change,vol
+"Boeing","209.16","211.41","207.91",-0.06,-0.03,4310000
+"General Motors","38.56","38.97","38.45",-0.09,-0.23,11720000
+"Chevron","151.02","155.31","150.99",-3.04,-1.97,8040000
+"Citigroup","53.98","54.44","53.53",-0.31,-0.57,11750000
+"Bank of America","33.05","33.25","32.83",-0.07,-0.2,30560000
+"AT&T","16.83","16.88","16.57",0.01,0.06,40000000
+"Caterpillar","316.89","322.33","315.57",-5.11,-1.59,2780000
+"Intel","43.31","43.52","42.40",0.81,1.91,43560000
+"Microsoft","420.55","420.82","415.09",6.44,1.56,21300000
+"Ford Motor","12.68","12.92","12.64",-0.15,-1.17,44810000
+"eBay","42.43","42.69","41.79",0.41,0.98,4340000
+"Walt Disney","108.37","110.14","107.69",-2.17,-1.96,19100000
+"Dow","53.99","54.12","53.56",0.11,0.2,3730000
+"Cisco","50.10","50.26","49.63",0.15,0.31,21620000
+"Deere&Company","381.32","385.30","380.46",-4.51,-1.17,1410000
+"FedEx","242.59","242.82","240.14",0.84,0.35,1720000
+"General Mills","62.34","63.86","62.09",-1.73,-2.69,4070000
+"Corning","32.04","32.05","31.58",0.31,0.98,2760000
+"Goldman Sachs","384.21","386.13","382.58",-0.83,-0.22,1620000
+"JPMorgan","174.96","175.10","173.67",0.16,0.09,4270000
+"Kimberly-Clark","119.81","120.47","119.12",-0.46,-0.38,1570000
+"Kraft Heinz","35.97","36.38","35.80",-0.5,-1.37,8020000
+"Coca-Cola","59.56","59.58","59.03",-0.27,-0.45,12020000
+"McDonald’s","289.41","292.49","288.94",-2.52,-0.86,3140000
+"Eli Lilly","739.51","745.68","733.61",3.83,0.52,2410000
+"Oracle","116.60","117.34","115.75",-0.08,-0.07,4990000
+"Merck&Co","125.43","126.69","125.04",-1.18,-0.93,5890000
+"Motorola","330.98","333.00","323.23",2.63,0.8,1180000
+"3M","92.89","93.30","92.39",-0.31,-0.33,3620000
+"Vertex","422.91","425.96","419.51",-0.15,-0.04,1100000
+"Monster Beverage","55.66","56.57","55.35",-0.83,-1.47,3760000
+"Fifth Third","33.65","33.74","33.02",0.26,0.78,4030000
+"Cintas","618.22","620.32","614.07",1.06,0.17,248630
+"Autodesk","266.68","269.53","262.85",5.17,1.98,1730000
+"Gilead","73.67","74.11","72.81",-0.13,-0.18,10150000
+"Alphabet A","149.00","149.44","146.18",3.09,2.12,26030000
+"Fiserv","144.23","144.34","142.74",0.68,0.47,1730000
+"Adobe","627.21","628.07","615.80",11.35,1.84,1950000
+"Qualcomm","151.00","153.40","148.35",2.82,1.9,11310000
+"Warner Bros Discovery","9.64","9.89","9.57",-0.19,-1.93,22450000
+"Applied Materials","185.84","186.15","178.62",11.95,6.87,9240000
+"Steel Dynamics","124.99","125.66","124.21",0.15,0.12,1120000
+"Cadence Design","311.94","313.11","308.82",4.58,1.49,1300000
+"Microchip","85.44","86.00","84.67",1.09,1.29,4750000
+"Wynn Resorts","105.60","106.89","104.26",-0.51,-0.48,2400000
+"Intuitive Surgical","388.22","389.92","383.05",1.28,0.33,1100000
+"Nasdaq Inc","57.25","57.35","56.65",0.49,0.86,1250000
+"Henry Schein","73.72","75.18","73.43",-1.18,-1.58,1330000
+"Paychex","123.03","123.25","121.84",0.28,0.23,1680000
+"VeriSign","198.38","203.00","197.08",-2.64,-1.31,1470000
+"Apple","188.85","189.99","188.00",0.77,0.41,43180000
+"Fastenal","70.02","70.06","69.16",0.76,1.1,2610000
+"Dentsply","32.79","33.16","32.73",-0.37,-1.12,3230000
+"Zions","40.09","40.41","39.45",0.2,0.5,2070000
+"Northern Trust","79.64","79.73","78.25",1.17,1.49,1120000
+"CH Robinson","74.67","74.85","73.59",0.01,0.01,775730
+"PACCAR","106.01","106.08","104.96",0.4,0.38,1400000
+"Amazon.com","174.45","175.00","170.58",4.61,2.71,52940000
+"Ross Stores","145.87","146.42","145.20",-0.19,-0.13,1260000
+"NetApp","89.85","90.33","88.78",0.93,1.05,1360000
+"Garmin","123.21","123.70","121.90",0.89,0.73,580350
+"Costco","723.40","725.53","720.12",-0.76,-0.1,1370000
+"Lam Research","911.58","913.82","874.86",47.22,5.46,1820000
+"Intuit","658.16","662.83","654.69",5.09,0.78,923900
+"Expedia","131.11","132.80","126.05",-28.36,-17.78,18410000
+"Cognizant A","77.10","78.57","76.87",-1.2,-1.53,5250000
+"Akamai","128.32","129.16","127.04",1.54,1.21,1690000
+"KLA Corp","649.80","651.26","628.55",31.31,5.06,1240000
+"Juniper","37.03","37.06","36.93",0.08,0.22,2540000
+"Amgen","291.12","295.00","289.72",-3.73,-1.27,3270000
+"Expeditors Washington","127.39","127.39","125.52",0.21,0.17,837390
+"Electronic Arts","140.61","140.98","137.00",1.76,1.27,1950000
+"T Rowe","106.33","109.83","105.90",-2.58,-2.37,2420000
+"Biogen","240.98","241.36","238.90",0.68,0.28,665370
+"Charles Schwab","63.37","63.41","62.35",0.9,1.44,4530000
+"Huntington Bancshares","12.41","12.48","12.19",0.09,0.73,13750000
+"Gen Digital","21.35","21.39","20.94",0.48,2.3,5700000
+"NVIDIA","721.33","721.85","702.12",24.92,3.58,42810000
+"Starbucks","97.30","97.99","96.31",0.71,0.74,9300000
+"Cincinnati Financial","108.89","109.48","107.12",1.29,1.2,610810
+"Axon Enterprise","270.98","271.39","268.44",1.98,0.74,191750
+"Hologic","73.44","74.14","73.09",0.01,0.01,1460000
+"Comcast","42.07","42.28","41.22",0.82,1.99,26670000
+"Medtronic","84.97","86.15","84.46",-1.21,-1.4,7820000
+"Dover","160.46","160.93","159.36",0.35,0.22,999650
+"Northrop Grumman","454.99","455.56","450.52",3.77,0.84,752290
+"MGM","46.74","46.86","46.21",0.31,0.67,3840000
+"Mastercard","457.74","458.98","456.37",-0.52,-0.11,2050000
+"General Dynamics","270.19","271.36","269.05",1.19,0.44,728860
+"DTE Energy","104.43","104.67","103.14",0.2,0.19,885020
+"Analog Devices","195.02","195.53","193.45",0.96,0.49,3150000
+"VF","15.30","15.50","15.04",-0.05,-0.33,7200000
+"Cardinal Health","104.94","105.42","103.28",2.2,2.15,1990000
+"Xcel Energy","58.17","58.20","57.67",0.17,0.29,2320000
+"DR Horton","144.93","145.31","142.95",0.34,0.24,1400000
+"IPG","30.76","31.71","30.60",-1.04,-3.27,6450000
+"Lockheed Martin","426.42","428.00","424.47",-0.58,-0.14,887810
+"Waters","322.90","327.57","320.82",-3.79,-1.16,397410
+"Accenture","371.63","372.48","367.95",3.15,0.85,1420000
+"Dominion Energy","44.70","44.72","43.92",0.52,1.18,2710000
+"Exxon Mobil","101.75","104.84","101.70",-2.22,-2.14,16690000
+"Cigna","334.85","335.83","330.67",2.56,0.77,1300000
+"Public Service Enterprise","58.41","58.62","57.83",0.21,0.36,1360000
+"NiSource","25.24","25.26","24.96",0.18,0.72,2330000
+"Zimmer Biomet","122.78","125.31","121.19",-0.26,-0.21,3110000
+"CSX","36.89","37.22","36.74",-0.18,-0.49,7940000
+"ICE","135.52","135.69","132.92",1.4,1.04,3850000
+"Southwest Airlines","32.50","32.64","31.80",0.17,0.53,8060000
+"Illinois Tool Works","255.71","255.77","253.63",1.2,0.47,655100
+"Darden Restaurants","167.65","168.34","167.16",-0.53,-0.32,549580
+"Truist Financial Corp","35.83","36.07","34.88",0.32,0.9,9970000
+"Halliburton","34.50","35.15","34.43",-0.53,-1.51,4550000
+"Prologis","132.45","132.77","130.45",0.79,0.6,2780000
+"McCormick&Co","64.64","65.94","64.33",-1.18,-1.79,1390000
+"Host Hotels Resorts","19.58","19.62","19.32",0.03,0.15,4010000
+"Estee Lauder","143.33","145.23","140.61",2.56,1.82,2340000
+"International Paper","35.26","35.32","34.63",0.37,1.06,3130000
+"Emerson","103.19","103.32","102.04",0.81,0.79,3340000
+"Clorox","153.12","155.46","152.44",-1.1,-0.71,753850
+"ConocoPhillips","111.11","114.26","111.02",-2.79,-2.45,5070000
+"Colgate-Palmolive","83.46","84.26","83.18",-0.8,-0.95,3460000
+"Pinnacle West","67.02","67.02","66.18",0.63,0.95,944540
+"Regions Financial","17.99","18.10","17.72",0.1,0.56,9480000
+"CenterPoint Energy","27.53","27.60","27.30",0.1,0.36,2090000
+"MetLife","67.49","67.67","66.40",0.74,1.11,4590000
+"Exelon","33.84","33.90","33.35",0.09,0.27,6090000
+"Baxter","39.55","40.52","38.79",-0.9,-2.24,4580000
+"Occidental","57.46","58.34","57.24",-0.59,-1.02,7450000
+"Southern","66.91","67.20","66.50",-0.03,-0.04,3250000
+"Tapestry","42.01","42.80","41.27",-0.98,-2.28,6310000
+"Lennar","153.03","153.80","151.32",-0.26,-0.17,1370000
+"Campbell Soup","42.00","42.91","41.72",-1.1,-2.55,2910000
+"State Street","72.81","72.98","72.11",0.43,0.59,1270000
+"Progressive","182.52","184.00","182.30",-0.44,-0.24,1710000
+"Vulcan Materials","240.05","240.10","237.40",1.61,0.68,1020000
+"Parker-Hannifin","521.42","521.50","513.99",5.91,1.15,472760
+"Genuine Parts","143.21","143.21","141.43",0.9,0.63,742180
+"CBRE A","86.54","86.64","84.77",0.58,0.67,1230000
+"DuPont De Nemours","67.66","67.72","66.57",0.56,0.83,3220000
+"Sherwin-Williams","311.77","312.99","309.39",-0.38,-0.12,885490
+"Pfizer","27.55","27.59","27.38",-0.01,-0.05,24950000
+"Wells Fargo&Co","48.05","48.35","47.47",-0.3,-0.62,13910000
+"Walmart","169.27","169.73","168.92",-0.1,-0.06,3930000
+"Edison","64.69","64.96","64.34",-0.03,-0.05,1470000
+"Snap-On","262.24","268.14","261.30",-3.79,-1.42,459630
+"Equifax","249.23","253.48","246.07",-2.83,-1.12,828980
+"McKesson","501.35","504.31","494.50",7.12,1.44,1030000
+"Entergy","97.94","98.02","96.80",0.54,0.55,917720
+"CMS Energy","56.06","56.11","55.61",0.31,0.55,1290000
+"Ameriprise Financial","396.45","398.15","392.95",1.62,0.41,235380
+"AIG","69.11","69.23","68.06",0.7,1.03,3020000
+"Ralph Lauren A","175.04","175.40","169.60",3.19,1.86,1730000
+"Bath & Body Works","44.74","44.78","43.79",0.37,0.83,1500000
+"IFF","79.93","80.30","78.72",-0.58,-0.72,3130000
+"WW Grainger","959.38","961.91","946.13",11.31,1.19,194930
+"Constellation Brands A","242.37","244.51","241.65",-0.68,-0.28,1170000
+"American Tower","194.41","194.49","191.64",0.77,0.4,1710000
+"Philip Morris","89.12","89.43","88.55",0.11,0.12,4300000
+"Fidelity National Info","61.78","62.11","61.40",0.34,0.55,2680000
+"Altria","40.10","40.15","39.88",0.01,0.02,8110000
+"Ball","59.16","59.26","58.21",0.02,0.03,1350000
+"Hartford","90.80","90.91","89.31",1.07,1.19,1510000
+"Hershey Co","195.39","201.79","194.68",-6.92,-3.42,2950000
+"Morgan Stanley","85.88","86.03","85.32",0.23,0.27,4620000
+"PNC Financial","147.76","148.38","146.68",-0.17,-0.11,1120000
+"Waste Management","188.87","189.78","187.56",-0.62,-0.33,1570000
+"Cencora Inc","230.69","231.60","228.77",0.37,0.16,1370000
+"Assurant","174.48","175.06","171.86",-0.09,-0.05,220360
+"Kroger","45.41","45.54","45.10",-0.03,-0.07,3120000
+"Molson Coors Brewing B","60.23","60.24","59.37",-0.04,-0.06,2060000
+"Home Depot","363.09","364.43","360.80",-0.63,-0.17,1760000
+"Becton Dickinson","243.66","244.05","240.37",2.95,1.23,2040000
+"JM Smucker","127.90","130.43","127.67",-3.19,-2.43,894090
+"Best Buy","75.58","75.68","74.76",0.09,0.12,1410000
+"Archer-Daniels-Midland","53.07","53.26","52.34",0.37,0.7,4250000
+"Brown Forman","56.59","56.94","56.31",-0.34,-0.6,847500
+"IBM","186.33","187.18","183.86",1.97,1.07,4970000
+"Union Pacific","249.45","249.55","246.51",0.63,0.25,1860000
+"Micron","85.56","85.62","83.96",0.68,0.8,12070000
+"Avery Dennison","204.92","205.15","202.01",1.95,0.96,409860
+"Marathon Oil","22.45","22.87","22.37",-0.25,-1.1,8040000
+"CF Industries","78.08","78.51","76.67",1.57,2.05,1780000
+"APA Corp","29.87","30.69","29.80",-0.6,-1.97,5240000
+"Duke Energy","91.69","92.72","91.63",-0.96,-1.04,3900000
+"KeyCorp","13.88","13.97","13.64",0.01,0.11,13200000
+"Laboratory America","222.58","223.60","222.18",-0.22,-0.1,376300
+"Boston Properties","64.18","65.36","63.60",-0.89,-1.37,1240000
+"Western Digital","56.82","57.35","56.25",-0.3,-0.53,5200000
+"PPG Industries","139.58","139.61","137.46",0.95,0.69,949590
+"S&P Global","438.02","441.04","431.33",1.39,0.32,1770000
+"Williams","34.03","34.26","33.85",-0.01,-0.01,5830000
+"Elevance Health","506.07","506.82","500.18",3.92,0.78,700780
+"Jacobs Engineering","145.54","145.54","143.12",2.37,1.66,737440
+"Eastman Chemical","82.32","82.83","81.90",-0.67,-0.81,622510
+"Verizon","39.72","40.09","39.26",-0.19,-0.49,15090000
+"Nucor","186.52","187.10","185.18",0.23,0.12,1170000
+"Omnicom","84.58","87.09","84.45",-2.05,-2.37,1550000
+"AvalonBay","174.62","174.63","173.20",0.09,0.05,573430
+"Marriott Int","247.02","250.75","245.45",-2.56,-1.03,1370000
+"Ingersoll Rand","85.89","86.51","85.27",0.51,0.6,3670000
+"Bristol-Myers Squibb","49.80","49.83","48.49",1.09,2.24,13400000
+"American Electric Power","76.66","76.73","75.57",0.72,0.95,2010000
+"Thermo Fisher Scientific","550.82","554.13","548.29",-0.07,-0.01,1160000
+"Newmont Goldcorp","32.79","33.22","32.54",-0.55,-1.65,10450000
+"Public Storage","284.04","286.34","280.59",-0.86,-0.3,544300
+"Travelers","214.50","214.99","212.04",0.69,0.32,793950
+"Stanley Black Decker","88.93","89.45","88.56",-0.34,-0.38,778810
+"Franklin Resources","27.09","27.12","26.58",0.26,0.97,2210000
+"Humana","370.16","371.16","366.30",2.36,0.64,1110000
+"Paramount Global B","12.90","13.17","12.84",-0.11,-0.85,9380000
+"Chubb","247.20","247.26","243.32",2.86,1.17,1370000
+"J&J","156.74","157.20","155.71",0.34,0.22,6280000
+"Tyson Foods","52.58","53.83","52.15",-1.39,-2.58,3100000
+"Target","146.51","147.57","146.32",-0.89,-0.6,2750000
+"Jabil Circuit","139.72","140.26","136.05",3.8,2.79,1270000
+"American Express","212.40","214.24","210.42",1.19,0.56,4100000
+"Masco","72.61","74.20","72.17",-0.71,-0.97,3640000
+"Stryker","341.85","344.33","337.63",2.82,0.83,1370000
+"Discover","109.19","109.44","108.03",0.35,0.32,1050000
+"Prudential Financial","105.58","107.65","105.00",-3.03,-2.79,2000000
+"Abbott Labs","111.78","112.63","111.19",-0.65,-0.58,5560000
+"General Electric","139.27","139.42","138.21",0.22,0.16,2900000
+"Quest Diagnostics","126.73","127.60","125.92",0.19,0.15,473100
+"United Parcel Service","146.20","147.83","145.91",-1.72,-1.16,2280000
+"CVS Health Corp","76.32","76.35","74.46",1.24,1.65,7350000
+"PPL","25.87","25.89","25.54",0.21,0.82,5330000
+"Robert Half","81.15","81.62","80.07",0.6,0.74,1010000
+"Simon Property","146.94","147.37","144.06",2.84,1.97,1790000
+"Johnson Controls","55.51","55.72","55.10",0.4,0.72,4240000
+"Cummins","251.84","251.91","248.73",1.92,0.77,572600
+"Allstate","160.06","160.59","158.53",-1.69,-1.04,1280000
+"Sempra Energy","69.67","70.03","69.28",-0.17,-0.24,1220000
+"Devon Energy","41.59","42.58","41.35",-0.82,-1.93,7220000
+"Conagra Brands","27.39","27.99","27.08",-0.7,-2.51,5110000
+"TJX","98.73","99.07","98.01",0.37,0.38,3420000
+"Whirlpool","109.00","110.43","108.64",-1.19,-1.08,669950
+"FirstEnergy","37.31","37.54","36.00",1.52,4.26,9590000
+"Globe Life","125.91","125.98","123.99",0.96,0.77,474680
+"Rtx Corp","90.52","91.61","90.33",-0.52,-0.57,5870000
+"PulteGroup","103.09","103.93","102.15",-0.17,-0.16,1090000
+"Valero Energy","143.08","143.27","141.16",1.28,0.9,3460000
+"Boston Scientific","65.49","65.60","64.85",0.47,0.72,6750000
+"Capital One Financial","135.17","135.50","133.35",0.39,0.29,1330000
+"PG E","16.25","16.39","16.18",0.01,0.03,18190000
+"Norfolk Southern","254.77","256.36","253.69",0.72,0.28,900100
+"Aflac","78.20","78.36","77.56",0.1,0.12,1500000
+"Equity Residential","58.86","59.28","58.65",-0.34,-0.57,1440000
+"Air Products","219.79","219.93","216.50",-0.12,-0.05,2170000
+"Principal Financial","78.20","78.47","76.82",0.44,0.57,828190
+"Texas Instruments","162.40","162.47","160.63",2.19,1.37,3820000
+"HP Inc","28.42","28.52","28.19",0.13,0.46,4110000
+"Honeywell","194.84","195.23","192.83",1.38,0.71,3570000
+"AMD","172.48","175.10","168.66",3.13,1.85,55790000
+"M&T Bank","133.40","133.51","130.09",1.78,1.35,1000000
+"Mosaic","29.91","30.49","29.82",-0.17,-0.58,5290000
+"Revvity","103.74","104.26","102.86",0.49,0.47,483210
+"Las Vegas Sands","53.62","53.85","53.09",0.01,0.01,3320000
+"Freeport-McMoran","37.31","37.91","37.26",-0.81,-2.12,14230000
+"AutoZone","2680.21","2743.53","2680.00",-51.45,-1.88,195110
+"Sysco","79.57","79.63","79.02",0.25,0.32,2120000
+"Ameren","68.67","68.83","67.59",0.76,1.11,1840000
+"Eaton","277.95","278.58","273.00",4.74,1.73,1530000
+"Salesforce Inc","291.27","295.24","291.07",-0.68,-0.23,3730000
+"Consolidated Edison","89.05","89.14","88.32",0.38,0.43,1400000
+"The AES","16.46","16.48","16.14",0.26,1.6,5390000
+"Textron","87.18","88.00","87.00",-0.41,-0.47,958370
+"U.S. Bancorp","40.18","40.39","39.77",-0.19,-0.47,8700000
+"Comerica","51.34","51.84","50.14",0.27,0.53,1370000
+"Visa A","276.40","277.18","274.09",0.62,0.22,2850000
+"Baker Hughes","29.06","29.46","28.83",-0.26,-0.89,7090000
+"Hess","142.04","147.65","142.02",-4.23,-2.89,4550000
+"Yum! Brands","130.27","130.41","129.32",-0.13,-0.1,1920000
+"Marsh McLennan","197.88","197.92","195.94",1.08,0.55,800330
+"Kellanova","53.48","54.74","53.12",-1.46,-2.65,3240000
+"Kimco Realty","20.10","20.10","19.65",0.08,0.4,6400000
+"Ecolab","202.67","203.62","200.50",-0.22,-0.11,972500
+"EOG Resources","111.05","113.75","110.67",-2.01,-1.78,2470000
+"Aon","312.47","312.55","306.67",5.29,1.72,753950
+"Hasbro","50.59","51.10","50.23",-0.09,-0.18,1320000
+"Bank of NY Mellon","55.21","55.36","54.83",0.1,0.18,2440000
+"Schlumberger","47.07","47.85","46.91",-0.72,-1.51,8170000
+"Walgreens Boots","22.24","22.63","22.16",-0.3,-1.33,8340000
+"Rockwell Automation","283.61","284.58","278.77",4.9,1.76,1490000
+"PepsiCo","167.67","171.39","166.97",-6.18,-3.55,12240000
+"UnitedHealth","518.11","520.39","516.34",-1.98,-0.38,2600000
+"Teradyne","102.31","102.42","98.86",3.84,3.9,1640000
+"Danaher","242.88","247.25","242.88",-2.99,-1.22,2030000
+"Seagate","89.41","89.47","87.36",1.73,1.97,1520000
+"Agilent Technologies","133.38","135.15","132.77",-0.69,-0.51,864180
+"Delta Air Lines","40.51","40.87","39.96",0.15,0.38,7570000
+"Moody’s","404.99","405.32","396.40",6.99,1.76,920590
+"Nike","104.50","104.93","103.33",0.73,0.7,4430000
+"Procter&Gamble","157.40","158.34","156.96",-1.24,-0.78,5860000
+"Weyerhaeuser","33.28","33.28","32.97",0.27,0.82,2300000
+"ADP","249.99","250.99","248.89",-1.09,-0.43,1190000
+"Keurig Dr Pepper","31.15","31.49","30.94",-0.34,-1.08,5120000
+"Lowe’s","222.27","222.31","219.17",1.88,0.85,1070000
+"United Airlines Holdings","42.33","43.03","41.60",0.71,1.71,9110000
+"Netflix","561.32","566.00","558.10",2.79,0.5,3020000
+"News Corp","27.21","27.34","26.88",0.2,0.74,874170
+"Equinix","855.76","856.82","844.90",0.43,0.05,354810
+"Booking","3758.18","3761.75","3663.01",-82.04,-2.14,395700
+"O’Reilly Automotive","1025.82","1041.33","1023.58",4.99,0.49,484720
+"BlackRock","796.68","800.80","792.23",3.48,0.44,426020
+"CME Group","205.09","205.60","203.61",1.09,0.53,1420000
+"Illumina","137.84","147.70","135.30",-5.49,-3.83,3470000
+"JB Hunt","215.58","215.90","211.95",2.2,1.03,495810
+"Loews","72.74","72.75","71.66",0.72,1,475990
+"NextEra Energy","56.56","56.63","55.72",0.27,0.48,7840000
+"First Solar","151.50","153.01","144.00",8.33,5.82,2730000
+"Viatris","11.68","11.69","11.45",0.12,1.04,6170000
+"F5 Networks","186.61","187.21","184.44",1.38,0.74,304830
+"Edwards Lifesciences","85.02","86.68","84.89",-0.78,-0.91,2830000
+"News Corp A","26.04","26.18","25.70",0.2,0.77,3940000
+"Amphenol","105.28","105.41","104.55",0.42,0.4,1250000
+"Berkshire Hathaway B","398.33","398.33","395.85",0.84,0.21,1920000
+"Coterra Energy","24.30","24.52","24.20",-0.2,-0.82,4840000
+"CarMax","74.79","74.86","72.90",1.49,2.03,1560000
+"Chipotle Mexican Grill","2636.06","2659.11","2615.93",15.58,0.59,191430
+"DaVita","109.87","111.27","109.73",-0.95,-0.86,677110
+"EQT","34.32","34.81","34.21",-0.43,-1.24,3190000
+"FMC","51.76","52.41","50.63",-0.28,-0.54,3270000
+"L3Harris Technologies","209.84","210.11","207.87",0.54,0.26,517540
+"Healthpeak Properties","17.35","17.80","17.07",-0.64,-3.56,13020000
+"Welltower","87.64","87.68","86.23",0.67,0.76,1720000
+"Hormel Foods","29.07","29.33","28.97",-0.41,-1.37,3560000
+"Invesco","15.89","15.95","15.68",-0.01,-0.09,2870000
+"Iron Mountain","68.63","68.94","68.18",0.07,0.1,642430
+"Eversource Energy","54.95","55.27","53.88",0.88,1.63,3160000
+"NRG","52.37","52.56","51.98",0.02,0.04,1720000
+"ONEOK","69.03","69.49","68.71",0.07,0.09,2080000
+"Pioneer Natural","227.15","233.37","226.85",-4.61,-1.99,1520000
+"Republic Services","173.49","175.07","172.79",-1.15,-0.66,929990
+"Roper Technologies","550.26","550.77","545.11",4.92,0.9,370800
+"Ventas","45.52","45.68","44.99",0,0,1630000
+"WEC Energy","77.57","77.74","76.95",0.17,0.22,2060000
+"Blackstone","127.68","128.63","125.99",-0.16,-0.13,2640000
+"Marathon Petroleum","169.97","170.69","168.73",0.29,0.17,2130000
+"Broadcom","1283.44","1285.65","1249.08",8.68,0.68,2550000
+"NXP","233.55","233.66","228.32",5.72,2.51,2340000
+"Tesla","193.57","194.12","189.49",4.01,2.12,83610000
+"Take-Two","154.91","158.11","152.23",-14.69,-8.66,6580000
+"Dollar Tree","139.50","140.73","139.17",-1.4,-0.99,2290000
+"Align","296.37","298.54","291.53",1.37,0.46,803120
+"ANSYS","342.28","346.64","341.89",-3.05,-0.88,834790
+"Builders FirstSource","185.38","186.54","182.89",0.13,0.07,1040000
+"Charter Communications","291.15","293.40","285.01",8.55,3.03,2050000
+"CoStar","83.13","83.45","80.51",1.36,1.66,4010000
+"DexCom","120.47","124.99","120.29",-6.58,-5.18,5550000
+"Fortinet","70.44","70.86","68.20",2.59,3.82,7090000
+"IDEXX Labs","572.21","578.35","565.52",-1.4,-0.24,312340
+"Incyte","57.66","57.96","57.09",0.3,0.52,1510000
+"Jack Henry&Associates","175.93","176.10","174.01",1.88,1.08,448190
+"MarketAxesss","223.32","226.60","220.29",-0.87,-0.39,280200
+"Monolithic","752.31","761.50","737.22",15.24,2.07,654900
+"Nordson","263.63","263.94","260.81",1.76,0.67,143780
+"ON Semiconductor","80.80","81.59","79.71",0.09,0.11,6140000
+"PTC","183.10","183.69","181.60",1.56,0.86,527660
+"Insulet","192.44","197.46","191.92",-4.2,-2.14,736300
+"Pool","386.65","391.01","384.42",-0.69,-0.18,211450
+"Bio-Techne","67.95","68.19","66.79",0.05,0.07,883500
+"Zebra","253.09","253.73","248.36",5.97,2.42,324810
+"BorgWarner","31.80","32.00","31.29",0.32,1.03,2860000
+"T-Mobile US","162.19","162.64","160.28",1.26,0.78,4280000
+"Quanta Services","210.03","211.00","206.43",2.26,1.09,656270
+"Leidos","113.52","114.23","112.99",0.25,0.22,621380
+"TE Connectivity","144.05","144.45","142.74",0.94,0.66,821920
+"Mid-America Apartment","124.53","124.95","123.37",0.05,0.04,1060000
+"Charles River Laboratories","222.21","224.61","217.13",3.44,1.57,522620
+"Huntington Ingalls Industries","274.05","274.32","271.02",1.92,0.71,188460
+"Mettler-Toledo","1175.31","1233.99","1169.94",-49.66,-4.05,289160
+"Federal Realty","101.14","102.03","99.94",-0.92,-0.9,855900
+"Live Nation Entertainment","89.54","90.50","87.93",1.54,1.75,3140000
+"Martin Marietta Materials","527.15","527.15","522.10",1.74,0.33,274340
+"FactSet Research","477.65","477.65","470.01",7.59,1.61,153500
+"Raymond James Financial","114.90","114.96","112.04",2.8,2.5,927470
+"Bio-Rad Labs","325.31","327.48","322.62",-0.8,-0.25,99820
+"Digital","147.23","147.94","145.54",0.17,0.12,1200000
+"Essex Property","229.86","230.36","228.46",0.52,0.23,269920
+"Fair Isaac","1322.98","1336.39","1317.44",1.54,0.12,94330
+"Cooper","376.60","376.95","370.49",2.95,0.79,160050
+"Molina Healthcare","388.67","390.00","378.05",7.18,1.88,460830
+"Everest","353.74","355.03","348.46",-0.82,-0.23,685340
+"Regency Centers","61.32","62.09","60.01",-0.82,-1.32,2270000
+"Dollar General","135.20","135.91","134.16",-0.45,-0.33,1850000
+"Transdigm","1118.35","1139.98","1116.11",-10.22,-0.91,279970
+"Atmos Energy","113.08","113.50","112.59",0.15,0.13,532110
+"Brown&Brown","81.00","81.01","79.75",1.05,1.32,991410
+"Domino’s Pizza Inc","424.98","427.55","424.45",-1.6,-0.38,339630
+"HCA","306.41","307.51","305.57",0.95,0.31,753540
+"Hubbell","363.13","363.36","357.50",4.92,1.37,266750
+"Rollins","43.48","44.12","43.19",-0.24,-0.56,1640000
+"STERIS","224.28","224.57","218.97",4.02,1.83,600580
+"ResMed","184.65","185.95","182.27",0.9,0.49,729020
+"MSCI","592.30","594.24","584.88",6.8,1.16,272690
+"NVR","7441.0","7476.6","7364.2",-45.7,-0.61,14930
+"Carnival Corp","15.30","15.74","14.96",-0.39,-2.49,45420000
+"West Pharmaceutical Services","409.79","412.67","408.30",-1.11,-0.27,269440
+"Teledyne Technologies","433.82","434.27","428.00",3.15,0.73,140650
+"Tyler Technologies","441.04","442.39","433.11",5.89,1.35,139190
+"Targa Resources","87.07","88.63","87.06",-0.83,-0.94,1310000
+"Meta Platforms","468.11","473.59","467.46",-1.89,-0.4,17910000
+"Alexandria RE","116.20","118.18","114.80",-1.7,-1.44,1260000
+"Teleflex","252.04","252.30","248.59",0.72,0.29,148180
+"Westinghouse Air Brake","136.68","137.56","136.15",-0.05,-0.04,1300000
+"Evergy","49.08","49.27","48.40",0.46,0.95,2230000
+"Willis Towers Watson","271.86","272.99","269.98",1.75,0.65,462240
+"Caesars","44.50","45.17","44.23",0.25,0.56,2900000
+"Enphase","122.47","124.55","117.30",5.59,4.78,5270000
+"Aptiv","82.02","82.39","80.85",0.73,0.9,2930000
+"Crown Castle","108.40","108.53","106.76",0.9,0.84,2640000
+"EPAM Systems","286.27","291.35","286.07",-0.9,-0.31,640890
+"Pentair","74.48","74.76","73.88",0.04,0.05,1390000
+"Mondelez","73.17","74.46","72.83",-1.59,-2.13,7300000
+"Skyworks","105.05","105.58","104.04",0.46,0.44,1500000
+"Tractor Supply","235.08","235.19","231.34",3.25,1.4,958700
+"Lululemon Athletica","470.24","471.26","458.78",-2.74,-0.58,1110000
+"Regeneron Pharma","953.42","957.51","945.85",6.99,0.74,500720
+"United Rentals","650.35","653.08","643.93",3.35,0.52,363440
+"Kinder Morgan","16.61","16.72","16.53",-0.03,-0.15,7420000
+"Albemarle","115.74","116.19","113.13",1.41,1.23,2310000
+"Centene","77.32","77.36","75.89",0.82,1.07,1930000
+"Phillips 66","145.66","147.78","145.35",-1.16,-0.79,2450000
+"Xylem","124.30","124.39","122.06",1.92,1.57,1550000
+"UDR","35.37","35.67","35.26",-0.12,-0.34,2340000
+"SBA Communications","217.45","218.13","214.00",1.25,0.58,946720
+"Gartner","463.63","465.02","456.59",7.45,1.63,334900
+"IDEX","228.11","228.28","225.29",2.28,1.01,422760
+"Universal Health Services","162.37","162.80","161.27",0.41,0.25,264750
+"LKQ","47.94","48.11","47.43",0.4,0.84,904460
+"Broadridge","198.98","199.86","198.50",-0.02,-0.01,607820
+"Extra Space Storage","143.36","144.18","142.39",-0.11,-0.08,694810
+"Camden Property","93.45","94.10","93.25",-0.5,-0.53,615980
+"Mohawk Industries","110.06","111.80","101.83",0.46,0.42,1980000
+"American Water Works","122.22","122.62","121.07",0.39,0.32,718930
+"Alliant Energy","47.93","47.99","47.33",0.45,0.95,1460000
+"Celanese","149.00","149.06","147.30",0.1,0.07,425180
+"Bunge","88.45","88.66","86.81",1.95,2.25,2580000
+"Ametek","168.49","168.60","166.41",2.19,1.32,800310
+"WR Berkley","80.46","80.51","79.33",0.58,0.73,891180
+"LyondellBasell Industries","95.42","95.42","94.37",0.44,0.46,1380000
+"Royal Caribbean Cruises","116.99","121.00","115.58",-3.98,-3.29,4120000
+"FleetCor","273.21","275.53","266.43",8.09,3.05,770350
+"Packaging America","168.37","168.39","166.21",1.5,0.9,450830
+"Arthur J Gallagher","238.81","239.18","236.29",1.78,0.75,440910
+"Church&Dwight","98.82","100.08","98.16",-1.12,-1.12,989910
+"Generac","126.97","128.39","125.16",-0.17,-0.13,884720
+"Global Payments","136.00","137.09","134.91",-0.63,-0.46,1510000
+"Realty Income","52.75","53.25","52.28",-0.41,-0.77,5830000
+"AO Smith","80.55","80.80","79.98",0.3,0.37,537460
+"Arch Capital","83.46","83.52","81.59",0.7,0.85,1090000
+"Cboe Global","183.55","185.92","182.72",-0.61,-0.33,574360
+"Copart","50.91","51.15","50.65",-0.05,-0.1,3010000
+"Old Dominion Freight Line","435.33","437.88","428.67",0.17,0.04,784180
+"Synopsys","575.30","582.85","571.92",4.61,0.81,967450
+"Trimble","52.51","52.64","51.74",0.43,0.83,1510000
+"Ulta Beauty","522.63","524.34","517.16",3.51,0.68,480210
+"Verisk","250.61","251.47","248.18",1.35,0.54,691700
+"AbbVie","174.04","175.40","173.06",-0.75,-0.43,3400000
+"Diamondback","151.74","154.22","151.25",-1.74,-1.13,963550
+"Norwegian Cruise Line","16.41","17.54","16.35",-1.09,-6.23,21310000
+"Zoetis Inc","197.29","198.22","195.59",1.54,0.79,1860000
+"IQVIA Holdings","218.26","222.21","216.18",1.26,0.58,1020000
+"ServiceNow Inc","813.27","815.27","802.39",13.86,1.73,847820
+"Palo Alto Networks","376.90","380.84","369.00",9.88,2.69,3430000
+"CDW Corp","245.23","245.41","241.49",1.27,0.52,870860
+"Hilton Worldwide","192.17","194.02","191.68",-2.38,-1.22,1530000
+"American Airlines","14.88","15.18","14.71",-0.07,-0.47,26850000
+"Allegion PLC","131.91","132.95","130.45",1.39,1.07,760630
+"Alphabet C","150.22","150.70","147.43",3,2.04,21350000
+"Paycom Soft","190.02","197.53","187.47",-5.73,-2.93,1770000
+"Arista Networks","282.30","284.82","278.63",6.41,2.32,2950000
+"Synchrony Financial","38.72","39.04","38.27",-0.16,-0.41,2810000
+"Catalent Inc","56.73","56.95","56.10",0.18,0.32,3640000
+"Citizens Financial Group Inc","31.51","31.69","30.89",0.14,0.45,3170000
+"Keysight Technologies","161.53","162.50","161.04",0.35,0.22,639790
+"Qorvo Inc","112.32","113.79","112.21",-0.3,-0.27,963360
+"Etsy Inc","78.09","78.78","73.56",3.6,4.83,3170000
+"WestRock Co","42.49","42.78","42.23",-0.33,-0.77,1680000
+"PayPal","58.91","59.22","56.16",2.78,4.95,30500000
+"Hewlett Packard","15.48","15.55","15.37",-0.01,-0.1,6130000
+"Match Group","35.42","35.95","34.95",0.39,1.11,2910000
+"Fortive","82.69","82.72","81.87",0.45,0.55,899160
+"Lamb Weston Holdings","100.84","101.17","99.57",-0.04,-0.04,881030
+"Invitation Homes","33.06","33.10","32.54",0.37,1.13,2410000
+"VICI Properties","29.71","29.73","29.34",0.04,0.15,4090000
+"Dayforce","70.69","70.71","68.39",0.71,1.01,1280000
+"Moderna","87.41","93.36","86.41",-6.25,-6.67,7110000
+"Uber Tech","70.89","72.04","69.69",-0.72,-1.01,20300000
+"Fox Corp A","29.79","29.85","28.74",1.01,3.51,5670000
+"Fox Corp B","27.45","27.58","26.61",0.83,3.12,1740000
+"Corteva","53.59","53.91","52.88",0.35,0.66,2400000
+"Amcor PLC","9.10","9.14","8.99",-0.07,-0.71,7140000
+"Trane Technologies","275.46","275.49","269.20",5.52,2.04,910240
+"Otis Worldwide","91.09","91.09","90.29",0.22,0.24,1700000
+"Carrier Global","56.00","56.02","54.61",0.94,1.71,4660000
+"Howmet","58.59","59.36","58.56",-0.58,-0.98,2390000
+"Airbnb","147.60","148.68","145.18",-2.94,-1.96,4950000
+"Constellation Energy","132.17","132.51","130.00",1.45,1.11,827840
+"GE HealthCare","81.34","82.75","80.61",-0.72,-0.88,2700000
+"Kenvue","19.32","19.61","19.08",-0.01,-0.03,24460000
+"Veralto","82.17","83.55","81.99",-0.39,-0.47,1180000
+"Linde PLC","419.42","419.83","412.29",5.42,1.31,1310000
\ No newline at end of file
diff --git a/examples/meilisearch_searchbar/src/fallback.rs b/examples/meilisearch_searchbar/src/fallback.rs
new file mode 100644
index 0000000000..ee9851fdda
--- /dev/null
+++ b/examples/meilisearch_searchbar/src/fallback.rs
@@ -0,0 +1,45 @@
+use axum::{
+ body::Body,
+ extract::State,
+ http::{Request, Response, StatusCode, Uri},
+ response::{IntoResponse, Response as AxumResponse},
+};
+use leptos::{view, LeptosOptions};
+use tower::ServiceExt;
+use tower_http::services::ServeDir;
+
+pub async fn file_and_error_handler(
+ uri: Uri,
+ State(options): State,
+ req: Request,
+) -> AxumResponse {
+ let root = options.site_root.clone();
+ log::debug!("uri = {uri:?} root = {root} ");
+ let res = get_static_file(uri.clone(), &root).await.unwrap();
+
+ if res.status() == StatusCode::OK {
+ res.into_response()
+ } else {
+ let handler = leptos_axum::render_app_to_stream(
+ options.to_owned(),
+ || view! {"Error! Error! Error!"},
+ );
+ handler(req).await.into_response()
+ }
+}
+
+async fn get_static_file(uri: Uri, root: &str) -> Result, (StatusCode, String)> {
+ let req = Request::builder()
+ .uri(uri.clone())
+ .body(Body::empty())
+ .unwrap();
+ // `ServeDir` implements `tower::Service` so we can call it with `tower::ServiceExt::oneshot`
+ // This path is relative to the cargo root
+ match ServeDir::new(root).oneshot(req).await {
+ Ok(res) => Ok(res.into_response()),
+ Err(err) => Err((
+ StatusCode::INTERNAL_SERVER_ERROR,
+ format!("Something went wrong: {}", err),
+ )),
+ }
+}
diff --git a/examples/meilisearch_searchbar/src/lib.rs b/examples/meilisearch_searchbar/src/lib.rs
new file mode 100644
index 0000000000..730253c2cf
--- /dev/null
+++ b/examples/meilisearch_searchbar/src/lib.rs
@@ -0,0 +1,121 @@
+use leptos::*;
+use leptos_meta::*;
+use leptos_router::*;
+#[cfg(feature = "ssr")]
+pub mod fallback;
+
+#[cfg(feature = "hydrate")]
+#[wasm_bindgen::prelude::wasm_bindgen]
+pub fn hydrate() {
+ // initializes logging using the `log` crate
+ _ = console_log::init_with_level(log::Level::Debug);
+ console_error_panic_hook::set_once();
+
+ leptos::mount_to_body(App);
+}
+
+#[component]
+pub fn App() -> impl IntoView {
+ provide_meta_context();
+ // Provide this two our search components, they'll share a read and write handle to a Vec.
+ let search_results = create_rw_signal(Vec::::new());
+ provide_context(search_results);
+ view! {
+
+
+
+
+
+
+
+ }/>
+
+
+
+ }
+}
+
+#[derive(Clone, serde::Deserialize, serde::Serialize, Debug)]
+pub struct StockRow {
+ id: u32,
+ name: String,
+ last: String,
+ high: String,
+ low: String,
+ absolute_change: f32,
+ percentage_change: f32,
+ volume: u64,
+}
+
+#[leptos::server]
+pub async fn search_query(query: String) -> Result, ServerFnError> {
+ use leptos_axum::extract;
+ // Wow, so ergonomic!
+ let axum::Extension::(client) = extract().await?;
+ // Meilisearch has great defaults, lots of things are thought of for out of the box utility.
+ // They limit the result length automatically (to 20), and have user friendly typo corrections and return similar words.
+ let hits = client
+ .get_index("stock_prices")
+ .await
+ .unwrap()
+ .search()
+ .with_query(query.as_str())
+ .execute::()
+ .await
+ .map_err(|err| ServerFnError::new(err.to_string()))?
+ .hits;
+
+ Ok(hits
+ .into_iter()
+ .map(|search_result| search_result.result)
+ .collect())
+}
+
+#[component]
+pub fn SearchBar() -> impl IntoView {
+ let write_search_results = expect_context::>>().write_only();
+ let search_query = create_server_action::();
+ create_effect(move |_| {
+ if let Some(value) = search_query.value()() {
+ match value {
+ Ok(search_results) => {
+ write_search_results.set(search_results);
+ }
+ Err(err) => {
+ leptos::logging::log!("{err}")
+ }
+ }
+ }
+ });
+
+ view! {
+
+ Search
+
+
+ }
+}
+
+#[component]
+pub fn SearchResults() -> impl IntoView {
+ let read_search_results = expect_context::>>().read_only();
+ view! {
+
+
+ {format!("{name}; last: {last}; high: {high}; low: {low}; chg.: {absolute_change}; chg...:{percentage_change}; volume:{volume}")}
+
+ }
+ }
+ />
+
+ }
+}
diff --git a/examples/meilisearch_searchbar/src/main.rs b/examples/meilisearch_searchbar/src/main.rs
new file mode 100644
index 0000000000..dfe164f956
--- /dev/null
+++ b/examples/meilisearch_searchbar/src/main.rs
@@ -0,0 +1,83 @@
+#[cfg(feature = "ssr")]
+#[tokio::main]
+async fn main() {
+ use axum::{routing::get, Extension, Router};
+ use leptos::get_configuration;
+ use leptos_axum::{generate_route_list, LeptosRoutes};
+ use meilisearch_searchbar::StockRow;
+ use meilisearch_searchbar::{fallback::file_and_error_handler, *};
+
+ // simple_logger is a lightweight alternative to tracing, when you absolutely have to trace, use tracing.
+ simple_logger::SimpleLogger::new()
+ .with_level(log::LevelFilter::Debug)
+ .init()
+ .unwrap();
+
+ let mut rdr = csv::Reader::from_path("data_set.csv").unwrap();
+
+ // Our data set doesn't have a good id for the purposes of meilisearch, Name is unique but it's not formatted correctly because it may have spaces.
+ let documents: Vec = rdr
+ .records()
+ .enumerate()
+ .map(|(i, rec)| {
+ // There's probably a better way to do this.
+ let mut record = csv::StringRecord::new();
+ record.push_field(&i.to_string());
+ for field in rec.unwrap().iter() {
+ record.push_field(field);
+ }
+ record
+ .deserialize::(None)
+ .expect(&format!("{:?}", record))
+ })
+ .collect();
+
+ // My own check. I know how long I expect it to be, if it's not this length something is wrong.
+ assert_eq!(documents.len(), 503);
+
+ let client = meilisearch_sdk::Client::new(
+ std::env::var("MEILISEARCH_URL").unwrap(),
+ std::env::var("MEILISEARCH_API_KEY").ok(),
+ );
+ // An index is where the documents are stored.
+ let task = client
+ .create_index("stock_prices", Some("id"))
+ .await
+ .unwrap();
+
+ // Meilisearch may take some time to execute the request so we are going to wait till it's completed
+ client.wait_for_task(task, None, None).await.unwrap();
+
+ let task_2 = client
+ .get_index("stock_prices")
+ .await
+ .unwrap()
+ .add_documents(&documents, Some("id"))
+ .await
+ .unwrap();
+
+ client.wait_for_task(task_2, None, None).await.unwrap();
+
+ drop(documents);
+
+ let conf = get_configuration(Some("Cargo.toml")).await.unwrap();
+ let leptos_options = conf.leptos_options;
+ let addr = leptos_options.site_addr;
+ let routes = generate_route_list(App);
+
+ // build our application with a route
+ let app = Router::new()
+ .route("/favicon.ico", get(file_and_error_handler))
+ .leptos_routes(&leptos_options, routes, App)
+ .fallback(file_and_error_handler)
+ .layer(Extension(client))
+ .with_state(leptos_options);
+
+ // run our app with hyper
+ // `axum::Server` is a re-export of `hyper::Server`
+ println!("listening on {}", addr);
+ let listener = tokio::net::TcpListener::bind(&addr).await.unwrap();
+ axum::serve(listener, app.into_make_service())
+ .await
+ .unwrap();
+}