Wirestrap is still in active development

This project is pre-1.0 and may introduce breaking changes at any time without prior notice.

Installation

To get started, install Wirestrap via Composer:

composer require wirestrap/wirestrap

JavaScript

Several components depend on @floating-ui/dom for positioning. Install it alongside the package:

npm install @floating-ui/dom

Import Wirestrap in your JS bundle:

import '../../vendor/wirestrap/wirestrap/resources/js/wirestrap.js';

Styles

Import the stylesheet in your CSS entry point:

@import '../../vendor/wirestrap/wirestrap/dist/wirestrap.css';

Configuration

Publish the config file to set package-wide defaults for every component:

php artisan vendor:publish --tag=wirestrap:config

Strict mode

Strict mode is enabled by default. Components that require an id will throw an exception if none is provided, preventing silent misbehaviour during Livewire re-renders. You can disable it in the config:

// config/wirestrap.php
'strict_mode' => false,

Coding assistants

Wirestrap ships with a concise Markdown reference covering every component, their props, and their JavaScript API. Point your coding assistant at the docs directly in the vendor folder:

vendor/wirestrap/wirestrap/docs/

If you prefer to have the docs in your own project, you can publish them:

php artisan vendor:publish --tag=wirestrap:docs