Plugin Development
Extend Apex with custom plugins.
Plugin API
The plugin API is currently in beta. APIs may change in future releases.
Creating a Plugin
Create a JavaScript file that exports a plugin object:
JS
// my-plugin.js
export default {
name: 'my-plugin',
version: '1.0.0',
// Add custom utilities
utilities: {
'.custom-class': {
property: 'value',
},
},
// Add custom components
components: {
'.my-component': {
base: 'p-4 border rounded',
variants: {
primary: 'bg-blue-500 text-white',
secondary: 'bg-gray-200 text-gray-800',
},
},
},
};Using Plugins
Add plugins to your configuration:
JS
// config.js
import myPlugin from './my-plugin.js';
export default {
plugins: [
myPlugin,
// other plugins
],
};Official Plugins
- @apexcss/forms - Form element styles
- @apexcss/typography - Prose and article styles
- @apexcss/aspect-ratio - Aspect ratio utilities
- @apexcss/line-clamp - Line clamp utilities