npm.io
4.10.0 • Published 1h ago

@open-pioneer/chakra-snippets

Licence
Apache-2.0
Version
4.10.0
Deps
5
Size
220 kB
Vulns
0
Weekly
0
Stars
4

@open-pioneer/chakra-snippets

Contains packaged Chakra snippets for Open Pioneer Trails applications. These are (mostly) default, unmodified snippets downloaded using the Chakra CLI.

When Chakra's documentation refers to a snippet such as this:

import { PasswordInput, PasswordStrengthMeter } from "@/components/ui/password-input";

Then you can usually use it simply from this package instead without having to install the snippet yourself:

import { PasswordInput, PasswordStrengthMeter } from "@open-pioneer/chakra-snippets/password-input";

If you notice a problem with one of the snippets, or if snippets are missing, feel free to open an issue or a pull request.

Usage

Available Snippets

  • alert.tsx
  • avatar.tsx
  • blockquote.tsx
  • breadcrumb.tsx
  • carousel.tsx: Aria labels have been translated.
  • checkbox-card.tsx
  • checkbox.tsx
  • clipboard.tsx: Prefer to use this snippet instead of the default Chakra one. The default Clipboard is not translated.
  • close-button.tsx: Prefer to use this snippet instead of the default Chakra one. The default CloseButton is not translated.
  • combobox.tsx
  • data-list.tsx
  • empty-state.tsx
  • field.tsx
  • floating-panel.tsx
  • input-group.tsx
  • link-button.tsx
  • native-select.tsx
  • number-input.tsx
  • password-input.tsx: Aria label has been translated.
  • pin-input.tsx
  • prose.tsx
  • qr-code.tsx
  • radio-card.tsx
  • radio.tsx
  • rating.tsx
  • slider.tsx
  • splitter.tsx
  • status.tsx
  • stepper-input.tsx
  • switch.tsx
  • tag.tsx
  • tags-input.tsx
  • toggle-tip.tsx
  • toggle.tsx
  • tooltip.tsx
Differences from Chakra's default snippets
  • Aria labels and messages are translated (Carousel, Clipboard, CloseButton and PasswordInput).
  • tooltip.tsx keeps rendering Tooltip.Root when disabled is set, so the trigger does not lose focus when the prop toggles.
  • tags-input.tsx adds a type annotation to TagsInputPropsProvider.

License

Apache-2.0 (see LICENSE file)

Keywords