sycho / flarum-uikit
Frontend utilities for extension developers.
Fund package maintenance!
Other
Installs: 9 584
Dependents: 6
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Language:TypeScript
Requires
- flarum/core: ^1.0.0
This package is auto-updated.
Last update: 2024-10-29 05:53:58 UTC
README
Flarum UiKit with reusable frontend utilities for extension developers. (Not An Extension)
Usage
Use the package's extender to register its resources.
extend.php
return [ new SychO\UiKit\Extend\Register, ];
example.js
import ProgressBar from 'flarum/uikit/common/ProgressBar'; import Label from 'flarum/uikit/common/Label'; import LabelGroup from 'flarum/uikit/common/LabelGroup'; import Input from 'flarum/uikit/common/Input'; import DiscussionSearch from 'flarum/uikit/forum/DiscussionSearch'; /** * @param mini bool small sized * @param alternate bool works with backgrounds using control-bg background color * @param progress number percentage * @param className string */ <ProgressBar fancy={true} mini={false} alternate={false} progress={93} /> /** * @param color string */ <Label color="red">Text</Label> /** * Container for a group of labels */ <LabelGroup></LabelGroup> /** * @param icon string fontawesome icon * @param className string * ...attrs: other attributes */ <Input icon="fas fa-user" className="Input--example"/> /** * @param state GlobalSearchState * @param ignore number * @param onSelect (discussion: Discussion) => void */ <DiscussionSearch state={} ignore={485} onSelect={(discussion) => ...} />
Installation
$ composer require sycho/flarum-uikit:^0.2.0
Updating
$ composer update sycho/flarum-uikit:^0.2.0
Links
License
The MIT License.