Premiers pas
Installer et utiliser le registre de composants Oward UI avec la CLI shadcn.
Oward UI est un registre de composants exploitable avec la CLI shadcn/ui. Un token d'authentification est nécessaire pour accéder au registry, contactez l'équipe Oward pour obtenir votre token d'accès.
Ce système d'authentification est une solution temporaire. Le registry évoluera prochainement vers un système d'accès plus flexible.
Installation
Avec token URL
Ajoutez simplement ?token=YOUR_TOKEN à l'URL :
npx shadcn@latest add "https://ui.oward.dev/r/button.json?token=YOUR_TOKEN"Une fois le premier composant installé avec le token, les suivants peuvent être installés sans répéter le token pendant 5 minutes.
Token persistant (components.json)
Créez un fichier .env.local pour stocker votre token de manière sécurisée :
REGISTRY_TOKEN=your_token_hereConfigurez ensuite le registry dans votre fichier components.json :
{
"registries": {
"@oward": {
"url": "https://ui.oward.dev/r/{name}.json",
"headers": {
"Authorization": "Bearer ${REGISTRY_TOKEN}"
}
}
}
}Installez vos composants avec le préfixe @oward/ :
npx shadcn@latest add @oward/button
npx shadcn@latest add @oward/cardN'oubliez pas d'ajouter .env.local à votre .gitignore pour ne jamais
committer votre token.
Exemples d'utilisation
# Installer un composant
npx shadcn@latest add @oward/button
# Installer plusieurs composants
npx shadcn@latest add @oward/card @oward/button @oward/alert