Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/singularit-de/base-input
https://github.com/singularit-de/base-input
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/singularit-de/base-input
- Owner: singularit-de
- Created: 2022-07-13T08:25:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-01T09:21:30.000Z (over 1 year ago)
- Last Synced: 2024-12-02T04:35:48.992Z (about 1 month ago)
- Language: TypeScript
- Size: 206 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @singularit/base-input
## Usage
```bash
npm i @singularit/base-input
``````vue
import {ref} from 'vue'
import {SBaseInput} from '@singularit/base-input'const name = ref('')
```
## Props
| Prop | Type | Default | Description |
|-----------------|----------|-------------|---------------------------------------------------------|
| modelValue | `string` | `undefined` | |
| type | `string` | `text` | TODO |
| inputAttributes | `object` | `undefined` | you can pass any HTML attributes to the input/textarea |
| classes | `string` | `{}` | used to override styling of input and children elements |## Styling
The input is styled with a [default theme](src/utils/defaultTheme.ts). If you want to override some parts of the theme
you can use the `classes` prop to pass any calles (e.g. tailwind classes).```vue
```
`SBaseInput` is designed to be wrapped in a component inside you project. Due to its flexibility it is very adaptable.
You can also create simple number inputs, text inputs, textareas, etc. (use the `inputAttributes` prop to pass any HTML attributes).See [interface `InputClass`](/src/interface.ts).
## Examples
coming soon