forked from PinsaraPerera/nextra-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from fossuok/dev
Dev
- Loading branch information
Showing
10 changed files
with
243 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
const meta = { | ||
"actionBar": "Action Bar", | ||
"alerts": "Alert", | ||
"button": "Button", | ||
"card": "Card", | ||
"form-inputs": "Form Inputs", | ||
"modal": "Modal", | ||
"navigation": "Navigation", | ||
"footer": "Footer", | ||
"typography": "Typography", | ||
} | ||
|
||
export default meta; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: Alert Design Guidelines | ||
component: Alert | ||
--- | ||
|
||
# Alerts | ||
|
||
Alerts provide feedback to users for important actions. | ||
|
||
## Variants | ||
|
||
- **Success**: Positive feedback. | ||
- **Error**: Negative feedback. | ||
- **Warning**: Cautionary feedback. | ||
|
||
## Code Example | ||
|
||
```jsx copy | ||
<div class="alert alert-success">Success! Your action was completed.</div> | ||
<div class="alert alert-error">Error! Something went wrong.</div> | ||
<div class="alert alert-warning">Warning! Proceed with caution.</div> | ||
``` | ||
|
||
## Accessibility | ||
|
||
- Use `role="alert"` for dynamic alerts. | ||
- Maintain color contrast for visibility. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: Button Design Guidelines | ||
component: Button | ||
--- | ||
|
||
# Button Design | ||
|
||
Buttons are interactive elements that allow users to perform actions. Here's how you should design buttons in our system. | ||
|
||
## Variants | ||
|
||
- **Primary Button**: Used for main actions. | ||
- **Secondary Button**: Used for less prominent actions. | ||
- **Disabled Button**: Non-clickable buttons. | ||
|
||
## Code Example | ||
|
||
```jsx copy | ||
<button class="btn btn-primary">Primary</button> | ||
<button class="btn btn-secondary">Secondary</button> | ||
<button class="btn btn-disabled" disabled>Disabled</button> | ||
``` | ||
|
||
## Accessibility | ||
|
||
- Ensure buttons have a `tabindex` for keyboard navigation. | ||
- Use `aria-label` when button content is non-textual (e.g., icons). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: Card Design Guidelines | ||
component: Card | ||
--- | ||
|
||
# Cards | ||
|
||
Cards are containers that group related information. | ||
|
||
## Usage | ||
|
||
- **Informational Cards**: Display textual data. | ||
- **Image Cards**: Combine text with visuals. | ||
|
||
## Code Example | ||
|
||
```jsx copy | ||
<div class="card"> | ||
<img src="image.jpg" alt="Card Image" /> | ||
<div class="card-content"> | ||
<h3>Card Title</h3> | ||
<p>Card description goes here.</p> | ||
</div> | ||
</div> | ||
``` | ||
|
||
## Accessibility | ||
|
||
- Use `alt` attributes for images. | ||
- Ensure focus states for interactive cards. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
title: Footer Design Guidelines | ||
component: Footer | ||
--- | ||
|
||
# Footer | ||
|
||
The footer provides secondary navigation and information. | ||
|
||
## Usage | ||
|
||
- **Links**: Important pages and policies. | ||
- **Copyright**: Legal information. | ||
|
||
## Code Example | ||
|
||
```jsx copy | ||
<footer class="footer"> | ||
<p>© 2024 FOSS Community. All rights reserved.</p> | ||
<nav> | ||
<a href="/privacy">Privacy Policy</a> | ||
<a href="/terms">Terms of Service</a> | ||
</nav> | ||
</footer> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: Form Input Guidelines | ||
component: Form Input | ||
--- | ||
|
||
# Form Inputs | ||
|
||
Forms allow users to input and submit information. | ||
|
||
## Input Types | ||
|
||
- **Text Input** | ||
- **Password Input** | ||
- **Dropdowns** | ||
- **Radio Buttons** | ||
- **Checkboxes** | ||
|
||
## Code Example | ||
|
||
```jsx copy | ||
<label for="name">Name</label> | ||
<input id="name" type="text" class="input-field" placeholder="Enter your name" /> | ||
|
||
<label for="terms"> | ||
<input id="terms" type="checkbox" /> Agree to terms | ||
</label> | ||
``` | ||
|
||
## Accessibility | ||
|
||
- Use `<label>` elements with `for` attributes. | ||
- Use `aria-describedby` for validation messages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
title: Modal Design Guidelines | ||
component: Modal | ||
--- | ||
|
||
# Modals | ||
|
||
Modals are overlays used for tasks like confirmations or alerts. | ||
|
||
## Usage | ||
|
||
- **Confirmation Modals** | ||
- **Information Modals** | ||
|
||
## Code Example | ||
|
||
```jsx copy | ||
<div class="modal"> | ||
<div class="modal-content"> | ||
<h2>Modal Title</h2> | ||
<p>This is the modal body.</p> | ||
<button class="btn btn-primary">Confirm</button> | ||
<button class="btn btn-secondary">Cancel</button> | ||
</div> | ||
</div> | ||
``` | ||
|
||
## Accessibility | ||
|
||
- Use `aria-hidden` and `aria-modal="true"`. | ||
- Ensure modals trap focus while open. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Navigation Guidelines | ||
component: Navigation | ||
--- | ||
|
||
# Navigation | ||
|
||
Navigation allows users to move between pages or sections. | ||
|
||
## Types of Navigation | ||
|
||
- **Top Navigation Bar** | ||
- **Side Navigation** | ||
- **Breadcrumbs** | ||
|
||
## Code Example | ||
|
||
```jsx copy | ||
<nav class="navbar"> | ||
<a href="/" class="nav-link">Home</a> | ||
<a href="/about" class="nav-link">About</a> | ||
<a href="/contact" class="nav-link">Contact</a> | ||
</nav> | ||
``` | ||
|
||
## Accessibility | ||
|
||
- Use `<nav>` elements with proper landmarks. | ||
- Add `aria-current` for active links. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: Typography Guidelines | ||
component: Typography | ||
--- | ||
|
||
# Typography | ||
|
||
Typography provides structure and hierarchy to content. | ||
|
||
## Font Family | ||
|
||
- **Primary Font**: Roboto or Sans-Serif | ||
- **Monospace Font**: For code snippets. | ||
|
||
## Font Sizes | ||
|
||
| Style | Size (px) | Weight | | ||
|------------|-------------|---------| | ||
| Heading 1 | 32px | Bold | | ||
| Heading 2 | 28px | Bold | | ||
| Body | 16px | Normal | | ||
|
||
## Code Example | ||
|
||
```jsx copy | ||
<h1 class="heading-1">Heading 1</h1> | ||
<p class="body-text">This is body text.</p> | ||
``` | ||
|
||
## Accessibility | ||
|
||
- Use appropriate heading levels (`<h1>` to `<h6>`). | ||
- Maintain a minimum 4.5:1 contrast ratio. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters