Installation
How to install dependencies and structure your application with Una UI.
Una UI is still in its early stages of development. Please expect breaking changes as we go along. We recommend to install it in your project using the edge channel to get the latest updates.
Una UI only supports Nuxt.js for now. However, you can create your own components using the Presets Mode installation.
Nuxt.js
You can install @una-ui/nuxt if you want to use the Una UI built-in components with Nuxt (@una-ui/preset
is included in this package).
Install @una-ui/nuxt
module:
Alternatively, you can clone or download the template from the Una UI Starter Template.
Install Dependencies
Development Server
Well done! A browser window should automatically open for http://localhost:3000.
That's it! You're ready to go! 🚀
Example Usage
Here is an example of the NFormGroup
, NInput
, and NButton
components.
Presets Mode
You can install @una-ui/preset if you want to use the Una UI configured styles and utilities to build your own components.
Full documentation for the Presets is not yet available, but you can check the available presets here for the meantime.
This is applicable to all UI library/frameworks that are supported by Unocss. Please refer to Unocss documentation for more information.
Install @una-ui/preset
module:
Add @una-ui/preset
to the presets
section of unocss.config.ts
:
If you don't have unocss.config.ts
file, you can create it in the root directory of your project. Below is the minimum configuration needed to get started. You can add more options as you go along.
Import styles in your main.ts
or any other entry point of your application:
That's it! You're ready to go! 🚀
Example Usage
Here's an example of input
, button
, and form-group
presets in plain HTML. You can apply the same approach to other UI libraries/frameworks.
Edge Channel
The Edge Channel provides updates for the latest package versions whenever there is a commit to the main branch.
You can install the Edge Channel by running the following command:
- Add
@una-ui/nuxt
to the devDependencies section ofpackage.json
:
- Remove lockfile (
package-lock.json
,yarn.lock
, orpnpm-lock.yaml
) and reinstall dependencies.
The same steps apply to
@una-ui/preset
package if you want to use the Presets Mode
Starter Template
We recommend to use the Edge Channel installation to get the latest updates.
- Github repo: https://github.com/una-ui/starter
- Repo demo: https://starter.una.ui
- Stackblitz playground: https://stackblitz.com/github/una-ui/starter ::