Yes, you can use fabric glue as an alternative to staples for attaching fabric and batting to your sewing basket.
Fabric glues like Dritz Unique Stitch and Dritz Liquid Stitch offer a permanent bond.
They are non-toxic, clear when dry, and machine washable and dryable, making them suitable for such projects.