Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/lib/forms/Textarea.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
on:click
on:contextmenu
on:focus
on:input
on:keydown
on:keypress
on:keyup
Expand Down
17 changes: 9 additions & 8 deletions src/routes/forms/textarea.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: Use the textarea component as a multi-line text field input and use

<script>
import { Htwo, ExampleDiv, GitHubSource, CompoDescription, TableProp, TableDefaultRow, MetaTag } from '../utils'

import { Heading, Breadcrumb, BreadcrumbItem, Badge, A } from '$lib'
import { props as items } from '../props/Textarea.json'
let propHeader = ['Name', 'Type', 'Default']
Expand Down Expand Up @@ -38,7 +38,7 @@ The textarea component is a multi-line text field input that can be used to rece

```html
<script>
import { Textarea } from 'flowbite-svelte'
import { Textarea } from 'flowbite-svelte';
</script>
```

Expand All @@ -48,7 +48,7 @@ Get started with the default example of a textarea component below.

```svelte example
<script>
import { Textarea, Label } from 'flowbite-svelte'
import { Textarea, Label } from 'flowbite-svelte'
</script>

<Label for="textarea-id" class="mb-2">Your message</Label>
Expand All @@ -61,7 +61,7 @@ If you want to add other actions as buttons alongside your textarea component, s

```svelte example
<script>
import { Textarea, Toolbar, ToolbarGroup, ToolbarButton, Button } from 'flowbite-svelte'
import { Textarea, Toolbar, ToolbarGroup, ToolbarButton, Button } from 'flowbite-svelte'
</script>

<form>
Expand All @@ -83,13 +83,14 @@ If you want to add other actions as buttons alongside your textarea component, s
<Button>Publish post</Button>
</form>
```

<Htwo label="Comment box" />

Most often the textarea component is used as the main text field input element in comment sections. Use this example to also apply a helper text and buttons below the textarea itself.

```svelte example class="space-y-4"
<script>
import { Textarea, Toolbar, ToolbarGroup, ToolbarButton, Button } from 'flowbite-svelte'
import { Textarea, Toolbar, ToolbarGroup, ToolbarButton, Button } from 'flowbite-svelte'
</script>

<form>
Expand All @@ -113,7 +114,7 @@ If you want to build a chatroom component you will usually want to use a textare

```svelte example class="space-y-4"
<script>
import { Textarea, Alert, CloseButton } from 'flowbite-svelte'
import { Textarea, Alert, CloseButton } from 'flowbite-svelte'
</script>

<form>
Expand All @@ -140,9 +141,8 @@ If you want to build a chatroom component you will usually want to use a textare

The component has the following props, type, and default values. See <A href="/pages/types">types page</A> for type information.


<TableProp header={propHeader} {divClass} {theadClass}>
<TableDefaultRow {items} rowState='hover' />
<TableDefaultRow {items} rowState='hover' />
</TableProp>

<Htwo label="Forwarded Events" />
Expand All @@ -152,6 +152,7 @@ The component has the following props, type, and default values. See <A href="/p
<Badge large={true}>on:change</Badge>
<Badge large={true}>on:click</Badge>
<Badge large={true}>on:focus</Badge>
<Badge large={true}>on:input</Badge>
<Badge large={true}>on:keydown</Badge>
<Badge large={true}>on:keypress</Badge>
<Badge large={true}>on:keyup</Badge>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/props/FooterCopyright.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"props":[["spanClass","string ","'block text-sm text-gray-500 sm:text-center dark:text-gray-400'"],["aClass","string ","'hover:underline'"],["year","number ","new Date().getFullYear()"],["href","string ","''"],["by","string ","''"],["target","string | undefined ","undefined"],["copyrightMessage","string ","All Rights Reserved."]]}
{"props":[["spanClass","string ","'block text-sm text-gray-500 sm:text-center dark:text-gray-400'"],["aClass","string ","'hover:underline'"],["year","number ","new Date().getFullYear()"],["href","string ","''"],["by","string ","''"],["target","string | undefined ","undefined"],["copyrightMessage","string ","'All Rights Reserved.'"]]}
2 changes: 1 addition & 1 deletion src/routes/props/NavUl.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"props":[["divClass","string ","'w-full md:block md:w-auto'"],["ulClass","string ","'flex flex-col p-4 mt-4 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium'"],["hidden","boolean ","true"]]}
{"props":[["divClass","string ","'w-full md:block md:w-auto'"],["ulClass","string ","'flex flex-col p-4 mt-4 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium'"],["hidden","boolean ","true"],["slideParams","SlideParams ","{ delay: 250, duration: 500, easing: quintOut }"]]}