npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dinefy/react-textarea

v1.0.7

Published

Dinefy React Web UI - textarea component

Downloads

29

Readme

@dinefy/react-textarea

Um componente textarea completo e acessível para o design system Dinefy, construído com Ark UI e Vanilla Extract.

Instalação

bun add @dinefy/react-textarea

Uso Básico

import { Textarea } from "@dinefy/react-textarea";

export function MyComponent() {
  return (
    <Textarea.Root>
      <Textarea.Label>Mensagem</Textarea.Label>
      <Textarea.Field placeholder="Digite sua mensagem..." />
      <Textarea.HelperText>Digite sua mensagem aqui</Textarea.HelperText>
    </Textarea.Root>
  );
}

Componentes

Textarea.Root

Container principal que gerencia o estado do textarea usando Ark UI Field.

Props:

  • disabled?: boolean - Desabilita o textarea
  • invalid?: boolean - Marca o textarea como inválido
  • readOnly?: boolean - Torna o textarea somente leitura

Textarea.Field

O campo textarea principal com todas as funcionalidades.

Props:

  • resize?: "none" | "both" | "horizontal" | "vertical" - Tipo de redimensionamento (padrão: "vertical")
  • resizable?: boolean - Permite redimensionamento (padrão: true)
  • autoResize?: boolean - Redimensionamento automático baseado no conteúdo (padrão: false)
  • minRows?: number - Número mínimo de linhas para auto-resize (padrão: 3)
  • maxRows?: number - Número máximo de linhas para auto-resize
  • textAlign?: "left" | "center" | "right" - Alinhamento do texto (padrão: left)
  • maxLength?: number - Limite máximo de caracteres

Nota sobre Tamanho: O componente não possui props de tamanho predefinidas. Use CSS, Tailwind ou qualquer sistema de estilo para controlar width, height, min-height, padding, font-size, etc.

Textarea.Label

Label do textarea com variants coloridas.

Props:

  • variant?: "default" | "success" | "error" | "warning" - Variant da cor (padrão: "default")

Textarea.HelperText

Texto auxiliar com variants coloridas.

Props:

  • variant?: "default" | "success" | "error" | "warning" - Variant da cor (padrão: "default")

Textarea.ErrorText

Texto de erro integrado com Ark UI.

Textarea.CharacterCount

Contador de caracteres opcional.

Props:

  • maxLength?: number - Limite máximo para mostrar progresso
  • showCount?: boolean - Mostra a contagem atual (padrão: true)
  • value?: string - Valor atual para calcular a contagem

Exemplos

Tamanhos Customizados via CSS

<Textarea.Root>
  <Textarea.Label>Pequeno</Textarea.Label>
  <Textarea.Field 
    placeholder="Textarea pequeno..." 
    style={{ minHeight: "80px", fontSize: "14px", padding: "8px 12px" }}
  />
</Textarea.Root>

<Textarea.Root>
  <Textarea.Label>Grande</Textarea.Label>
  <Textarea.Field 
    placeholder="Textarea grande..." 
    style={{ minHeight: "200px", fontSize: "18px", padding: "16px 20px" }}
  />
</Textarea.Root>

Auto-Resize

<Textarea.Root>
  <Textarea.Label>Auto Resize</Textarea.Label>
  <Textarea.Field 
    autoResize={true}
    minRows={3}
    maxRows={8}
    placeholder="Cresce automaticamente..."
  />
</Textarea.Root>

Não Redimensionável

<Textarea.Root>
  <Textarea.Label>Fixo</Textarea.Label>
  <Textarea.Field 
    resizable={false}
    placeholder="Não pode ser redimensionado..."
  />
</Textarea.Root>

Com Contador de Caracteres

<Textarea.Root>
  <Textarea.Label>Com Limite</Textarea.Label>
  <Textarea.Field 
    maxLength={280}
    placeholder="Máximo 280 caracteres..."
  />
  <Textarea.CharacterCount maxLength={280} />
</Textarea.Root>

Estados de Erro

<Textarea.Root invalid>
  <Textarea.Label>Mensagem</Textarea.Label>
  <Textarea.Field placeholder="Campo com erro..." />
  <Textarea.ErrorText>Este campo é obrigatório</Textarea.ErrorText>
</Textarea.Root>

Funcionalidades

  • Flexibilidade de Tamanho: Controle total via CSS/Tailwind (sem props de tamanho)
  • Redimensionamento: Controle completo sobre resize (none, both, horizontal, vertical)
  • Auto-Resize: Cresce automaticamente baseado no conteúdo
  • Alinhamento de Texto: left, center, right
  • Estados Visuais: Normal, hover, focus, disabled, readonly, invalid
  • Acessibilidade: Integração completa com Ark UI Field
  • Contador de Caracteres: Opcional com limite máximo
  • Reset CSS: Normalização cross-browser completa
  • Design Tokens: Integração com @dinefy/theme-web
  • TypeScript: Tipagem completa e segura

Dependências

  • @ark-ui/react: Sistema de Field para gerenciamento de estado
  • @dinefy/theme-web: Design tokens e temas
  • react: 19+
  • react-dom: 19+